Error building with `cloudflare`, `vercel-edge` or `netlify-edge` presets
See original GitHub issueEnvironment
- Node.js v16.14.2
- Nuxt 3.0.0-rc.6
- Nitropack 0.4.12
Reproduction
Click here to access reproduction on Stackblitz, then run the below command:
# working as expected
npm run build
# build errors
NITRO_PRESET=cloudflare npm run build
NITRO_PRESET=vercel-edge npm run build
NITRO_PRESET=netlify-edge npm run build
Describe the bug
Nuxt3 build is failing when running with edge-related presets such as:
NITRO_PRESET=cloudflare
NITRO_PRESET=vercel-edge
NITRO_PRESET=netlify-edge
Additional context
Probably related to:
Logs
Example logs when using NITRO_PRESET=cloudflare
:
ERROR Rollup error: Cannot resolve "/home/projects/nitro-preset-cloudflare-issue/node_modules/unenv/runtime/node/stream/index/web.cjs" from "/home/projects/nitro-preset-cloudflare-issue/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js" and externals are not allowed!
ERROR Cannot resolve "/home/projects/nitro-preset-cloudflare-issue/node_modules/unenv/runtime/node/stream/index/web.cjs" from "/home/projects/nitro-preset-cloudflare-issue/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js" and externals are not allowed!
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Known issues · Cloudflare Pages docs
Known issues. Here are some known bugs and issues with Cloudflare Pages: Builds and deployment. GitHub and GitLab are currently the only ......
Read more >Introducing the PlanetScale serverless driver for JavaScript
The ability to store and query data in PlanetScale from environments such as Cloudflare Workers, Vercel Edge Functions, and Netlify Edge ...
Read more >PlanetScale on Twitter: "@Cloudflare @vercel @Netlify We ...
This new driver & infrastructure update brings you: - The ability to store & query data in PlanetScale in HTTP-compatible environments - ...
Read more >nitro/CHANGELOG.md at main · unjs/nitro - GitHub
Build and deploy universal JavaScript servers. ... Add cloudflare-pages preset (#210); Support prerendering binary files (#320); Opt-in option to compress ...
Read more >Connecting to Postgres from the Edge with Deno Deploy
... (e.g. Cloudflare Workers, Vercel Edge Functions, or Netlify Edge Handlers). ... With Deno Deploy, we are building a more serverless at edge...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The original reproduction (linked above) is now succeeding: https://stackblitz.com/edit/nitro-preset-cloudflare-issue-yxjhpg. I can’t speak to your project @warflash but you are welcome to open a new issue with a reproduction and I’ll be very happy to look into it.
Oh right, I missed the repro link, sorry about that. Opened #410, thanks for taking a look! 💯