node_modules/sharp makes problems
See original GitHub issueThanks for the great starter!
Two weeks ago it was working fine.
But today I newly installed your starter, I was unable to run it on local server.
Perhaps it’s not your starter’s fault, maybe it’s the sharp module
.
The command I executed:
gatsby new gatsby-starter-sas-marketing https ://github.com/keegn/gatsby-starter-saas- marketing
cd gatsby-starter-saas-marketing
gatsby develop
Description of the error output:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
Require stack:
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/sharp/lib/constructor.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/sharp/lib/index.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby-plugin-sharp/safe-sharp.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby-plugin-sharp/index.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby-transformer-sharp/extend-node-type.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby-transformer-sharp/gatsby-node.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/bootstrap/load-plugins/index.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/bootstrap/index.js
- /Users/kyo/dev/Gastby/gatsby-starter-saas-marketing/node_modules/gatsby/dist/commands/develop.js
- /Users/kyo/.nodebrew/node/v14.2.0/lib/node_modules/gatsby-cli/lib/create-cli.js
- /Users/kyo/.nodebrew/node/v14.2.0/lib/node_modules/gatsby-cli/lib/index.js
- /Users/kyo/.nodebrew/node/v14.2.0/lib/node_modules/gatsby-cli/cli.js
- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Something went wrong installing the "sharp" module #2517
the issue is probably caused by webpack-node-externals . it faild to add node modules to webpack.resolve.externals , because it resolves the ...
Read more >Can't install Sharp - node.js - Stack Overflow
Simply put, npm tries to switch to a user account when installing modules, as modules installed as root can be only used by...
Read more >sharp - npm
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.31.3, ...
Read more >Troubleshooting Common Errors - Gatsby
The version of Node.js that's used to install sharp needs to match the version of Node.js that is run, so clearing node_modules and...
Read more >How To Process Images in Node.js With Sharp - DigitalOcean
js has an ecosystem of libraries you can use to process images, such as sharp, jimp, and gm module. This article will focus...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/gatsbyjs/gatsby/issues/4693#issuecomment-427256961
I’ve solved it!
Here are the steps:
node_modules
foldernpm cache clean --force
gatsby develop
on your terminal/cmd.#https://github.com/gatsbyjs/gatsby/issues/4693#issuecomment-427256961
Thanks @newt0. I’ll try to reproduce this and will update accordingly.