Nuxt + Cloudflare Pages + Cloudflare Environments + Wrangler.json
Hi,
I'm having issue with deploying to cloudflare pages. How can I specify which environment I use from wrangler.json?
My wrangler json
My deploy command (I test locally)
I get this error
https://nuxt.com/deploy/cloudflare and https://nitro.build/deploy/providers/cloudflare have no mentions of environemnt except for --env flag which can be used for specifying enviromnent for the wrangler deploy command.
Adding that flag makes no difference.
Cloudflare - Nitro
Deploy Nitro apps to Cloudflare.
2 Replies
Hi @hackal. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the knowledge sources do not contain explicit information about integrating Nuxt deployments on Cloudflare Pages with Cloudflare Environments via
wrangler.json
, nor do they describe how to select or use specific environments from wrangler.json
during deployment.
The official Nuxt documentation for Cloudflare Pages deployment covers using the cloudflare_pages
Nitro preset and connecting a D1 database, but does not mention Cloudflare Environments or how to configure or select them via wrangler.json
or deployment commands. The documentation also does not address the error message you are seeing regarding "redirected configurations" and environments in wrangler.json
Deploy to Cloudflare Pages.
If you need environment-specific configuration in Nuxt, the documentation suggests using per-environment overrides in nuxt.config.ts
and selecting environments with the --envName
flag during build, but this is separate from Cloudflare's Wrangler environments and does not describe how to bridge the two systems Nuxt Configuration.
Based on the available knowledge sources, there is no documented solution for your scenario. You may need to consult Cloudflare's or Wrangler's documentation directly, or seek guidance from the Nuxt or Cloudflare community for this specific integration.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@77852149421191168> Kapa.ai is still learning and improving, please let me know how I did by reacting below.