@nuxt/image throw error 500 in production
hello there!
I recently added @nuxt/image to my project and locally it works fine, but I deploy a test to my qa domain and all the images throw an error 500
This is my configuration in nuxt.config.ts
modules: [
'@nuxt/image'
],
image: {
quality: 100,
format: ['webp'],
screens: {
xs: 320,
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
xxl: 1536,
'2xl': 1536
},
domains: ['https://www.cyberpuerta.mx', 'https://cyberpuerta.mx', 'https://qa-web-mobile.cyberpuerta.mx']
},
In this case, my QA domain is something like https://qa-web-mobile.my-domain.mx
And the images come from my production domain example, https://www.my-domain.mx/img/picture1.png
I'm using @nuxt/image 1.3.0
The error on the image shows this:
[500] [IPX_ERROR]
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-linuxmusl-x64.node'
Require stack:
- /app/server/node_modules/sharp/lib/sharp.js
- /app/server/node_modules/sharp/lib/constructor.js
- /app/server/node_modules/sharp/lib/index.js
Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current linuxmusl-x64 runtime: "npm install --platform=linuxmusl --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
0 Replies