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.

Failing nitro builds for edge targets

See original GitHub issue

Environment

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:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
warflashcommented, Aug 23, 2022

Running into the same issue with deck.gl and cloudflare workers at the moment, did you happen to find any workaround @warflash?

I did not no. Just gotta wait and hope it’s something that can be resolved soon I guess🤞

0reactions
victorkwok97commented, Sep 1, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moving Nitro to standalone bundler #1690 - nuxt/framework
Today, Nitro exports a semi-standalone API and auto-published as @nuxt/nitro-edge and bundling Nuxt's SSR app using rollup, h3, unstorage, ...
Read more >
Run an MSBuild target after a failed build - Stack Overflow
If the build failed by the compiler, for example due to a syntax error in a code file, the second target isn't run....
Read more >
Solved: Power Automate Desktop Fails in New Microsoft Edge...
The only way I can get it to just open the one tab is if Edge has already been launched and if the...
Read more >
What Is Nitromethane, Anyway? - MotorTrend
If spark fails early in the run, unburned nitro can build up and then explode with a force that can blow the heads...
Read more >
KB5016904 Windows 11 Insider Dev Build 25163.1010 ...
You can choose OneDrive as a target to directly upload the file to OneDrive via the built-in Windows share window. (Please note this...
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