Gatsby: Problem installing Plugins / Windows10

Created on 20 Dec 2017  Â·  5Comments  Â·  Source: gatsbyjs/gatsby

I was able to install a theme and the filesystem but failed at sharp and remark. Any clue what the problem is here?

PS C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-site> npm install --save gatsby-plugin-sharp
[email protected] install C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-sitenode_modulessharp
node-gyp rebuild
C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-sitenode_modulessharp>if not defined npm_config_node_gyp (node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-b
in\....node_modulesnode-gypbinnode-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:Python27python.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 Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-sitenode_modulessharp
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN gatsby-starter-hello-world@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
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-gyp rebuild
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:UsersDaniel JakobianAppDataRoamingnpm-cache_logs2017-12-20T13_45_48_365Z-debug.log

Most helpful comment

ah i remember, i had the same problem. this pngquant. exe was not installed. I think i npm installed pngquant-bin manually. make sure the exe shows up in the node_modules directory

All 5 comments

Hi,

the sharp plugin is a bit painful - but the instruction here:

https://www.gatsbyjs.org/docs/gatsby-on-windows/

make it work on Windows (go to "If npm install still fails…")

Could you try with Python 2.7 not 3 ?

thanks so much for the quick responses! I was able to install the plugins after installing the windows build tools. But now I am stuck a the gatsby develop part. Any ideas?

PS C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-site> gatsby develop
success delete html files from previous builds — 0.009 s
success open and validate gatsby-config.js — 0.004 s
success copy gatsby files — 0.034 s
success onPreBootstrap — 0.021 s
success source and transform nodes — 0.424 s
success building schema — 0.391 s
success createLayouts — 0.035 s
success createPages — 0.042 s
success createPagesStatefully — 0.035 s
success onPreExtractQueries — 0.001 s
success update schema — 0.124 s
success extract queries from components — 0.116 s
success run graphql queries — 0.328 s
error The system cannot find the path specified.
Error: spawn C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-sitenode_modulespngquant-binvendorpngquant.exe ENOENT

  • enoent.js:11 notFoundError
    [gatsby-site]/[cross-spawn]/lib/enoent.js:11:11
  • enoent.js:46 verifyENOENT
    [gatsby-site]/[cross-spawn]/lib/enoent.js:46:16
  • enoent.js:33 ChildProcess.cp.emit
    [gatsby-site]/[cross-spawn]/lib/enoent.js:33:19
  • child_process.js:209 Process.ChildProcess._handle.onexit
    internal/child_process.js:209:12
    error UNHANDLED REJECTION
    Error: spawn C:UsersDaniel JakobianDocumentsHTML PROJECTSgatsbyTestgatsby-sitenode_modulespngquant-binvendorpngquant.exe ENOENT
  • enoent.js:11 notFoundError
    [gatsby-site]/[cross-spawn]/lib/enoent.js:11:11
  • enoent.js:46 verifyENOENT
    [gatsby-site]/[cross-spawn]/lib/enoent.js:46:16
  • enoent.js:33 ChildProcess.cp.emit
    [gatsby-site]/[cross-spawn]/lib/enoent.js:33:19
  • child_process.js:209 Process.ChildProcess._handle.onexit
    internal/child_process.js:209:12

ah i remember, i had the same problem. this pngquant. exe was not installed. I think i npm installed pngquant-bin manually. make sure the exe shows up in the node_modules directory

thanks so much! It is working now (the real work can finally begin).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonmp picture brandonmp  Â·  3Comments

ferMartz picture ferMartz  Â·  3Comments

3CordGuy picture 3CordGuy  Â·  3Comments

andykais picture andykais  Â·  3Comments

kalinchernev picture kalinchernev  Â·  3Comments