You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install per the README and add "type": "module" to package.json. Make an http page request..
Describe the bug
Startup and make a page request. The first page request shows an error that suggests that the nuxt bridge is compiling to commonjs code even thought the package is a module.
Additional context
No response
Logs
[web] New request: http://code.local:3000/
[web] [nuxt] [request error] [unhandled] [500] require() of ES Module /home/project/resp-val/.nuxt/dist/server/server.js not supported.
[web] server.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
[web] Instead rename server.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs"in /home/project/resp-val/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
The text was updated successfully, but these errors were encountered:
Thanks for the feedback, I already changed paths though. Next time I'll try out those online stacks like you said, they look promising. I'm just going to http proxy this in using Nuxt 3.
Environment
nuxt@2.16.3
nuxt dev
node v18
Reproduction
Install per the README and add
"type": "module"
to package.json. Make an http page request..Describe the bug
Startup and make a page request. The first page request shows an error that suggests that the nuxt bridge is compiling to commonjs code even thought the package is a module.
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: