Something went wrong installing the "sharp" module
See original GitHub issueDescription
gatsby develop
fails on existing site or even a new build.
Full error below:
Error in "/Users/hsnyc/Documents/Hosts/hsnyc/hsnyc_v4/hsnyc-gatsby/node_modules/gatsby-transformer-sharp/gatsby-node.js":
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
- Run "npm rebuild --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues
Error: Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
- Run "npm rebuild --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/ install
- Search for this error at https://github.com/lovell/sharp/issues
- constructor.js:34 Object.<anonymous>
[hsnyc-gatsby]/[sharp]/lib/constructor.js:34:9
- v8-compile-cache.js:178 Module._compile
[hsnyc-gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:789 Object.Module._extensions..js
internal/modules/cjs/loader.js:789:10
- loader.js:653 Module.load
internal/modules/cjs/loader.js:653:32
- loader.js:593 tryModuleLoad
internal/modules/cjs/loader.js:593:12
- loader.js:585 Function.Module._load
internal/modules/cjs/loader.js:585:3
- loader.js:692 Module.require
internal/modules/cjs/loader.js:692:17
- v8-compile-cache.js:159 require
[hsnyc-gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
- index.js:3 Object.<anonymous>
[hsnyc-gatsby]/[sharp]/lib/index.js:3:15
- v8-compile-cache.js:178 Module._compile
[hsnyc-gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:789 Object.Module._extensions..js
internal/modules/cjs/loader.js:789:10
- loader.js:653 Module.load
internal/modules/cjs/loader.js:653:32
- loader.js:593 tryModuleLoad
internal/modules/cjs/loader.js:593:12
- loader.js:585 Function.Module._load
internal/modules/cjs/loader.js:585:3
- loader.js:692 Module.require
internal/modules/cjs/loader.js:692:17
- v8-compile-cache.js:159 require
[hsnyc-gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
not finished load plugins - 0.330s
Steps to reproduce
Had node 8 installed when I first noticed the error. Upgraded to 12, cleared npm cache npm cache clear
and gatsby cache gatsby clean
. Rebuild npm rebuild --verbose sharp
no errors.
Downgraded to Node 10 and repeated the above steps. Same error.
Expected result
To have the local server run.
Actual result
Sharp error
Environment
System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Shell: 3.2.57 - /bin/bash Binaries: Node: 10.18.0 - /usr/local/bin/node npm: 6.13.4 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 83.0.4103.61 Firefox: 57.0.4 Safari: 13.1 npmPackages: gatsby: ^2.21.37 => 2.21.37 gatsby-image: ^2.4.4 => 2.4.4 gatsby-plugin-manifest: ^2.4.5 => 2.4.5 gatsby-plugin-offline: ^3.2.3 => 3.2.3 gatsby-plugin-react-helmet: ^3.3.1 => 3.3.1 gatsby-plugin-sharp: ^2.6.4 => 2.6.4 gatsby-source-filesystem: ^2.3.4 => 2.3.4 gatsby-transformer-sharp: ^2.5.2 => 2.5.2 npmGlobalPackages: gatsby-cli: 2.12.36
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:13 (2 by maintainers)
Top GitHub Comments
Well after various attempts to resolve I finally found a solution.
Here is how I was able to get it to work (Using a MAC):
The aforementioned code did the trick for me.
npm rebuild --verbose sharp