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

Difficulty installing gatsby-plugin-sharp - node-gyp errors #6976

Closed
zapbampow opened this issue Aug 2, 2018 · 2 comments
Closed

Difficulty installing gatsby-plugin-sharp - node-gyp errors #6976

zapbampow opened this issue Aug 2, 2018 · 2 comments
Labels
status: needs more info Needs triaging and reproducible examples or more information to be resolved type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@zapbampow
Copy link

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 friendly-errors-webpack-plugin@1.7.0 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: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.20.5 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 sharp@0.20.5 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).

@LekoArts
Copy link
Contributor

LekoArts commented Aug 2, 2018

Have a look at the docs:
https://www.gatsbyjs.org/docs/gatsby-on-windows/

@Chuloo Chuloo added type: question or discussion Issue discussing or asking a question about Gatsby status: needs more info Needs triaging and reproducible examples or more information to be resolved labels Aug 2, 2018
@zapbampow
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info Needs triaging and reproducible examples or more information to be resolved type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants