Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting missing sharp module error #268

Open
StephenMarkToms opened this issue Oct 24, 2020 · 2 comments
Open

Documenting missing sharp module error #268

StephenMarkToms opened this issue Oct 24, 2020 · 2 comments

Comments

@StephenMarkToms
Copy link

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:

  • /Users/stephentoms/Sites/Sutura/node_modules/@aceforth/nuxt-optimized-images/lib/loaders/responsive-loader.js

  • /Users/stephentoms/Sites/Sutura/node_modules/@aceforth/nuxt-optimized-images/lib/resource-queries.js

  • /Users/stephentoms/Sites/Sutura/node_modules/@aceforth/nuxt-optimized-images/lib/loaders/img-loader.js

  • /Users/stephentoms/Sites/Sutura/node_modules/@aceforth/nuxt-optimized-images/lib/loaders/index.js

  • /Users/stephentoms/Sites/Sutura/node_modules/@aceforth/nuxt-optimized-images/lib/index.js

  • /Users/stephentoms/Sites/Sutura/node_modules/@nuxt/core/dist/core.js

  • /Users/stephentoms/Sites/Sutura/node_modules/nuxt/dist/nuxt.js

  • /Users/stephentoms/Sites/Sutura/server/index.js

    Error: Cannot find module 'node_modules/responsive-loader/lib/index.js/sharp'
    Require stack:

    • node_modules/@aceforth/nuxt-optimized-images/lib/loaders/responsive-loader.js
    • node_modules/@aceforth/nuxt-optimized-images/lib/resource-queries.js
    • node_modules/@aceforth/nuxt-optimized-images/lib/loaders/img-loader.js
    • node_modules/@aceforth/nuxt-optimized-images/lib/loaders/index.js
    • node_modules/@aceforth/nuxt-optimized-images/lib/index.js
    • node_modules/@nuxt/core/dist/core.js
    • node_modules/nuxt/dist/nuxt.js
    • server/index.js
      at getResponsiveLoaderOptions (node_modules/@aceforth/nuxt-optimized-images/lib/loaders/responsive-loader.js:18:15)
      at getResourceQueries (node_modules/@aceforth/nuxt-optimized-images/lib/resource-queries.js:133:26)
      at applyImgLoader (node_modules/@aceforth/nuxt-optimized-images/lib/loaders/img-loader.js:99:10)
      at appendLoaders (node_modules/@aceforth/nuxt-optimized-images/lib/loaders/index.js:134:14)
      at WebpackBundler. (node_modules/@aceforth/nuxt-optimized-images/lib/index.js:62:16)
      at next (node_modules/@nuxt/utils/dist/utils.js:1866:27)
      at WebpackBundler. (node_modules/@nuxt/utils/dist/utils.js:1881:12)
      at WebpackBundler. (node_modules/@nuxt/utils/dist/utils.js:1875:29)
      at WebpackServerConfig.extendConfig (node_modules/@nuxt/webpack/dist/webpack.js:4884:37)
      at WebpackServerConfig.config (node_modules/@nuxt/webpack/dist/webpack.js:4919:45)

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
Copy link

Thanks. This fixed the following error for me:

Something went wrong installing the "sharp" module

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

@StephenMarkToms
Copy link
Author

Thanks. This fixed the following error for me:

Something went wrong installing the "sharp" module

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

Anytime! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants