Failing nitro builds for edge targets
See original GitHub issueEnvironment
nitro 0.4.18
Reproduction
Bridge: https://stackblitz.com/edit/github-mdiu2d?file=pages%2Findex.vue Nuxt 3: https://stackblitz.com/edit/github-ouxssx?file=nuxt.config.ts
npm run build
Describe the bug
Building the nitro server fails for edge deploy targets such as cloudflare
in this particular reproduction.
Error: Rollup error: Cannot resolve "asciify-image" from "/home/projects/github-mdiu2d/node_modules/@probe.gl/log/dist/es5/node/node-asciify-image.js" and externals are not allowed!
Choosing a deploy target other then edge makes the issue disappear
Additional context
The probe.gl library used here wraps module.require()
inside of a try catch block which I suspect might be causing the issue in nitro.
https://github.com/uber-web/probe.gl/blob/master/modules/log/src/node/node-asciify-image.ts
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top GitHub Comments
I did not no. Just gotta wait and hope it’s something that can be resolved soon I guess🤞
https://stackblitz.com/edit/github-dfijad-x7236k?file=nuxt.config.ts,app.vue,package.json
Same issue with mongodb and aws-sdk packages as well which have require inside of a try catch block.