Closed tmlmt closed 1 year ago
Hey @tmlmt, thank you for the detailed issue.
The beta.22 version introduced a compatibility table for each Nitro runtime and how they load the web assembly files. The default loading strategy was set to import
which Node can't handle. 2.0.0-beta.30 is updated to use fetch
for node-server
which looks like it solves the issue.
You can safely ignore the nitro warning, I'll try and get them fixed soon.
Let me know if you still have any issues
Thanks a lot @harlan-zw ! It works now.
Hey @harlan-zw, weird stuff. I cried victory too early, the problem is still here in my production app (same 500 error: ). Doesn't work from beta.22 to beta.40. Had to revert to beta.21 to work again.
I'm deploying on my own server with node v16, with pm2. No pre-rendered routes, all SSR.
Describe the bug
Hey Harlan, things have not transitioned well since the latest bump of nuxt-of-image on my project. I have been able to trace the issue back to transitioning from beta.21 (which works) to beta.22 and things still don't work with beta.29. I'm not sure what is the exact cause and it might be multiple bugs but I can at least describe the symptoms I experience below:
In my minimal repro (see link below)
error_01 When building the app, I see the following errors at the
Building Nitro Server (preset: node-server)
step:error_02 When starting the app, I immediately get the following error:
[nitro] [dev] [unhandledRejection] TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".wasm" for /home/tmlmt/dev/nuxt-starter-3ueqlw/.output/server/chunks/rollup/resvg.wasm
error_03 The index page still loads, but when I then try to reach http://localhost:3000/__og_image__/og.png, it loads indefinitely, and I get the following error in server logs:
In my production app
I get the same TypeError at start-up, and then the following error on any
__og_image__/og.png
Reproduction
https://stackblitz.com/edit/nuxt-starter-3ueqlw
Steps
npm i
npm run build
: see error_01 abovenode .output/server/index.mjs
: see error_02 aboveWorkaround
I have rolled back to
2.0.0-beta.21
for the time beingSystem / Nuxt Info