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
When running a production build of the application where the node_modules have been pruned via npm prune --production, if you don't include ipx in the "dependencies" section of your package.json, the application will fail to load images and if you check the network tab, the following error is listed for the image resources. Even installing ipx as a devDepdendency fails in the final build if node_modules are not present. Im assuming the ipx lib is not being built into the final nuxt output.
[500] [IPX_ERROR] Could not load the "sharp" module using the linuxmusl-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
yarn add sharp --ignore-engines
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=linux --libc=musl --cpu=x64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
Current Workaround
Installing the ipx library as a dependency and NOT a devDependency seems to remedy the issue.
Issue
When running a production build of the application where the
node_modules
have been pruned vianpm prune --production
, if you don't includeipx
in the "dependencies" section of your package.json, the application will fail to load images and if you check the network tab, the following error is listed for the image resources. Even installingipx
as adevDepdendency
fails in the final build if node_modules are not present. Im assuming the ipx lib is not being built into the final nuxt output.Current Workaround
Installing the
ipx
library as adependency
and NOT adevDependency
seems to remedy the issue.Not working package.json
Working
The text was updated successfully, but these errors were encountered: