Running with a newer version of Node - env var not being passed through?

I need to use node 22 to build/deploy, which I understand can be achieved by setting NODE_VERSION=22. I've set this under Settings > Variables and Secrets but the deployment details then list "Environment variables: None" and it doesnt appear to effect the build?
3 Replies
Josh
Josh•3w ago
Curiously everything works when i recreate the deployment, but obviously I'd rather not have to have the downtime of changing CNAME records so some way to get it working with the original would be appreciated 🙂
AGill
AGill•3w ago
I'm having the same issue: https://discord.com/channels/595317990191398933/1291619831870656584 And also https://discord.com/channels/595317990191398933/1288937653537869979 By recreate deployment, do you mean deleting the pages project entirely? and recreating? Because I've also tried re-deploying within the same project to no avail.
Josh
Josh•3w ago
If you go to the workers & pages overview, and press create, make a new application with identical settings to the existing one (including env vars) then env vars should show up correctly in the new one. Moving DNS over is a pain though so I really would rather get the original one working...
Want results from more Discord servers?
Add your server