Gatsby: Difficulty installing gatsby-plugin-sharp - node-gyp errors

Created on 2 Aug 2018  Â·  2Comments  Â·  Source: gatsbyjs/gatsby

Description

I'm simply trying to install gatsby-plugin-sharp so that I can use gatsby-image. However, when I try to it running into errors that I'm unable to fix.

Steps to reproduce

npm install --save gatsby-plugin-sharp
This obviously works for everyone else.

Actual result

It begins the process of downloading and installing. Then I get the following errors related to node-gyp. I have read through issue 1754, but I wasn't able to get a different result after trying some of the solutions mentioned there. Maybe someone will see more in the errors than I can see.

info sharp Copying DLLs from C:\Users\Ingalls\Documents\Clayton Learning\gatsby-learning\gatsby-blog\node_modules\sharp\vendor\lib to C:\Users\Ingalls\Documents\Clayton Learning\gatsby-learning\gatsby-blog\node_modules\sharp\build\Release
prebuild-install WARN install No prebuilt binaries found (target=9.3.0 runtime=node arch=x64 platform=win32)

C:\Users\Ingalls\Documents\Clayton Learning\gatsby-learning\gatsby-blog\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\Ingalls\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
else (node "C:\Users\Ingalls\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python27\python.exe -c import platform; print(platform.python_version());
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:272:12)
gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:363:11)
gyp ERR! stack     at Socket.emit (events.js:159:13)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:568:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Ingalls\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ingalls\Documents\Clayton Learning\gatsby-learning\gatsby-blog\node_modules\sharp
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-starter-hello-world@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ingalls\AppData\Roaming\npm-cache\_logs\2018-08-02T19_11_43_518Z-debug.log

Environment

System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
  Binaries:
    npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    gatsby: ^1.9.277 => 1.9.277
    gatsby-cli: ^1.1.58 => 1.1.58
    gatsby-link: ^1.6.40 => 1.6.40
    gatsby-plugin-typography: ^1.7.19 => 1.7.19
    gatsby-source-wordpress: ^2.0.93 => 2.0.93

And Node and node-gyp are both the most recent releases(
9.3 and 3.7).

needs more info question or discussion

Most helpful comment

Bam! That’s it. Sometimes a person with the right answer is way better than piles of googling.

All 2 comments

Bam! That’s it. Sometimes a person with the right answer is way better than piles of googling.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timbrandin picture timbrandin  Â·  3Comments

ferMartz picture ferMartz  Â·  3Comments

signalwerk picture signalwerk  Â·  3Comments

Oppenheimer1 picture Oppenheimer1  Â·  3Comments

benstr picture benstr  Â·  3Comments