juliomrqz / nuxt-optimized-images

🌅🚀 Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
https://marquez.co/docs/nuxt-optimized-images/
MIT License
841 stars 30 forks source link

Documenting missing sharp module error #268

Open StephenMarkToms opened 4 years ago

StephenMarkToms commented 4 years ago

Working off of the latest version of the repository and found a bug and a solution. Documenting here the bug and fix incase anyone else is having the issue:

error on build looks something like this: Cannot find module '/Users/stephentoms/Sites/Sutura/node_modules/responsive-loader/lib/index.js/sharp' Require stack:

Fix is to by installing responsive-loader as a dependency to the project till the dependency is updated in this package.

npm i responsive-loader@latest

fshareef commented 3 years ago

Thanks. This fixed the following error for me:

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node'
StephenMarkToms commented 3 years ago

Thanks. This fixed the following error for me:

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node'

Anytime! :)