question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error building with `cloudflare`, `vercel-edge` or `netlify-edge` presets

See original GitHub issue

Environment

  • 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Aug 10, 2022

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.

0reactions
warflashcommented, Aug 10, 2022

Oh right, I missed the repro link, sorry about that. Opened #410, thanks for taking a look! 💯

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found