Marius
CDCloudflare Developers
•Created by Marius on 8/5/2024 in #general-help
env variables not being read
Hi guys, I am pretty much a new-comer when it comes to Cloudflare and Pages so maybe I was doing this wrong but I need some help.
I have succesfully uploaded one of the projects I work on and when I tried to run a couple of endpoints all of them where giving back 500. After some digging I realised the issue came from the env variables not being read and thus all of my endpoints creating errors when running.
The things is I have no ideea what I did wrong, I checked for the names of the variables to be correct, even added VITE_ as a prefix for all of them to make it compliant with Vite documentation, but no matter what I do, the env variables are still not being read.
To be more specific, the env variables are all declared in the settings tab, I did multiple redeploys and then when running import.meta.env.something the value returns as null.
1 replies