Even if you would be able to use the

Even if you would be able to use the editor, the way your framework packages it would make it unusable anyway. Here's an example of a framework deployment to workers
No description
9 Replies
Lancelot™
Lancelot™4mo ago
Can I dm you my specific problem? Actually I can just write it here So I have a nextjs app deployed to workers. But I can't access my env vars Added them in wrangler and .dev.vars still no luck
boop
boopOP4mo ago
Placing them in .dev.vars wont deploy them to prod afaik
boop
boopOP4mo ago
You can either use the GUI and add them Under "Variables and secrets" under the Settings > Runtime tab
No description
boop
boopOP4mo ago
Whoops Just now realised you added them in your wrangler Check this tab anyway to see if they've been deployed
Lancelot™
Lancelot™4mo ago
Yeah they are deployed but it's so weird that when I console log process.env they show undefined. So I read that they are included in env only without the process. But nextjs doesn't know the definition of env
boop
boopOP4mo ago
It wont be on the process.env, it will be on the request context https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/bindings/
Cloudflare Docs
Using bindings in your Next.js app · Cloudflare Pages docs
Once you have set up next-on-pages, you can access bindings from any route of your Next.js app via getRequestContext:
boop
boopOP4mo ago
Just note that I may be talking out of my ass here, I've never used NextJs on CloudFlare Ah yeah, seems the above link is for deployment to Pages
boop
boopOP4mo ago
If you're deploying to workers and using opennext, the same applies. You would find it in your bindings like so: https://opennext.js.org/cloudflare/bindings
Bindings - OpenNext
Open-source Next.js adapters
Lancelot™
Lancelot™4mo ago
Thank you so much this helped me find the env's

Did you find this page helpful?