All my .env variables seem suddenly undefined. Did something change internally?

I'm on pages & nuxt
No description
11 Replies
cosbgn
cosbgn4w ago
This was the issue. The new comp date removes all my env variables. Does anyone knows why?
texan
texan4w ago
Hey cosbgn, tried to reproduce this locally by following these steps, but wasn't successful: - Create new pages project using 2024-06-03 for compat date - Uploaded assets - Added a variable in dash - Updated toml to use 2024-09-02 compat date - Reuploaded assets - Visually see in dash variables are still present Can you readily reproduce this with a new project and let us know the steps you took?
cosbgn
cosbgn4w ago
They are present also for me in the dashboard They show up as before But when my code runs and tries to access some it throws an error as it's undefined I use nuxt3 and I use them as process.env.VAR_NAME which has always worked for me Can you try to run a function to see if the code can read them?
texan
texan4w ago
In the middle of an incident at the moment, I will try to give this a go when I come up for air!
hfcRed
hfcRed4w ago
Heya, having the same issue as of today, during the build process, env variables are now set to none.
No description
hfcRed
hfcRed4w ago
Yesterday, everything worked as expected and the secret showed up in the variables during the build process
No description
hfcRed
hfcRed4w ago
I made no changes to the vars, wrangler file or the code, my compat date is set to 2024-09-24 The vars still show up in the settings as well, have not found a way to reproduce unfortunately I guess I did change the root directory from / to /frontend, that is the only difference between the two deployments
Walshy
Walshy4w ago
Revert your compat date back to 2024-09-22 or earlier There's a known issue with Nuxt and the new nodejs compat v2 behaviour
hfcRed
hfcRed4w ago
hmmm that didnt work unfortunately deleted the project and re-deployed, works again
cosbgn
cosbgn3w ago
Any way to get this working? It's been almost a week and I can't deploy my nuxt app (I need the comp flag for postgres). I just tried and it's still all undefined.
hfcRed
hfcRed3w ago
The workaround I currently use is to just delete the project from my account and then make a new one whenever I add a new env variable Its very tedious but it works If your page is already live and being used this wouldnt be much of an option ofc
Want results from more Discord servers?
Add your server