Custom environment variables set for a Pages project get lost

I have set up a small build as follows: https://github.com/survivejs/website-v3/blob/main/build.sh . In addition, I have specified several environment variables through the UI. Since I rely on workers in my Pages project, there is also wrangler.toml in place. The problem is that when building, it's reporting Build environment variables: (none found) and printenv doesn't show any of the environment variables I defined through the UI. Curiously it's also missing variables like CF_PAGES_COMMIT_SHA that should be there based on documentation. Do you know how to configure the project/Wrangler so that these environment variables don't get lost?
1 Reply
bebraw
bebraw7mo ago
Compared to another project that's working as expected, this one is doing Reading build configuration from your wrangler.toml file... for some reason so I suppose figuring out how to avoid this particular step might resolve the whole problem the weird thing is that both projects are using wrangler so maybe i'll try reducing them to the same version or so it looks like downgrading wrangler from 3.48.0 to 3.31.0 solved the issue. i think i have to read the changelogs later to understand how to change my code to make env work again in the newer version. thanks for rubberducking
Want results from more Discord servers?
Add your server