unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
383 stars 20 forks source link

upgrade from v2 to bridge,unenv package load error #44

Closed 0xinhua closed 1 year ago

0xinhua commented 2 years ago

Hi,I need to ask for some help or advice,when I use nuxi preview to build for production file output,got the following error:

Rollup error: Could not load /project/node_modules/unenv/runtime/npm/node-fetch/lib/index.js.cjs: ENOENT: no such file or directory, open '/project/node_modules/unenv/runtime/npm/node-fetch/lib/index.js.cjs

Could not load /project/node_modules/unenv/runtime/npm/node-fetch/lib/index.js.cjs: ENOENT: no such file or directory, open '/project/node_modules/unenv/runtime/npm/node-fetch/lib/index.js.cjs'

Nuxt project info:


pi0 commented 1 year ago

Let's track it in bridge repo. It is hard to tell from here and is probably a bundling issue with nuxt2,bridge or nitro that adds extra .js to subpath.