Gatsby: Error starting new project compiling

Created on 8 Jan 2020  Â·  6Comments  Â·  Source: gatsbyjs/gatsby

Hello, I have this error trying to set up a new Gatsby project.
I'm using node v13.6.0, npm v6.13.4, python 3.7 and visual express 2017
I'm able to install for example bcrypt, I wonder if it's an issue with Linux file path like.

$ gatsby new wp-gatsby https://github.com/GatsbyCentral/gatsby-starter-wordpress
info Creating new site from git: https://github.com/GatsbyCentral/gatsby-starter-wordpress.git
Cloning into 'wp-gatsby'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 53 (delta 1), reused 33 (delta 0), pack-reused 0
Unpacking objects: 100% (53/53), done.
success Created starter directory layout
info Installing packages...

> [email protected] install C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\deasync
> node ./build.js

`win32-x64-node-12` exists; testing
Binary is fine; exiting

> [email protected] install C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached C:\Users\userXX\AppData\Roaming\npm-cache\_libvips\libvips-8.8.1-win32-x64.tar.gz
info sharp Creating C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\sharp\build\Release
info sharp Copying DLLs from C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\sharp\vendor\lib to C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\sharp\build\Release

> [email protected] install C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\userXX\AppData\Roaming\npm-cache\node-sass\4.13.0\win32-x64-72_binding.node

> [email protected] postinstall C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\core-js
> node postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\gatsby-telemetry
> node src/postinstall.js


> [email protected] postinstall C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\cwebp-bin
> node lib/install.js

  ‼ read ECONNRESET
  ‼ cwebp pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "./configure --disable-shared --prefix="C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\cwebp-bin\vendor" --bindir="C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\cwebp-bin\vendor""
'.' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.


    at C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

> [email protected] postinstall C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\mozjpeg
> node lib/install.js

  ‼ read ECONNRESET
  ‼ mozjpeg pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -fiv"
'autoreconf' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.


    at C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

> [email protected] postinstall C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\pngquant-bin
> node lib/install.js

  ‼ read ECONNRESET
  ‼ pngquant pre-build test failed
  i compiling from source
  × Error: pngquant failed to build, make sure that libpng-dev is installed
    at C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\execa\index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\xampp\htdocs\wordpress\wp-gatsby\node_modules\fsevents\node_modules'
npm WARN [email protected] 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 WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\chokidar\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] postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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\userXX\AppData\Roaming\npm-cache\_logs\2020-01-07T14_33_53_695Z-debug.log

 ERROR

Command failed with exit code 1: npm install



  Error: Command failed with exit code 1: npm install

  - error.js:56 makeError
    [node-v12.14.0-win-x64]/[gatsby-cli]/[execa]/lib/error.js:56:11

  - index.js:114 handlePromise
    [node-v12.14.0-win-x64]/[gatsby-cli]/[execa]/index.js:114:26

  - task_queues.js:93 processTicksAndRejections
    internal/process/task_queues.js:93:5
question or discussion

All 6 comments

Hey, thanks for opening an issue. Have you tried installing npm install windows-build-tools -g? windows-build-tools are probably required.

You can read more about this on https://www.gatsbyjs.org/docs/gatsby-on-windows/#setting-up-your-environment-for-building-native-nodejs-modules.

Please let u know if this fixed or didn't fix your issue.

Hello I installed Visual Express because my company is too big to use Visual Studio for free.

@micka753 Unsure but there must be an equivalent way to installing build tools?

If not, I'd recommend WSL personally

@micka753 have you taken a look at this might help you with your issue. You'll probably need to modify the installation following these steps

@jonniebigodes is absolutely right!

Marking this as resolved and closing since this isn't strictly a Gatsby issue but feel free to comment if you need any more help on this. Thanks!

Thanks for the help, I m not able to modify the configuration of Visual Express (it does not offer more choices than the language packs).
I tried WSL but I can't install WSL 2 because of my Windows version, and was not able to configure access to the Internet with WSL 1.
Still I was able to install Docker, so I'll try Gatsby this way.
Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  Â·  3Comments

theduke picture theduke  Â·  3Comments

brandonmp picture brandonmp  Â·  3Comments

Oppenheimer1 picture Oppenheimer1  Â·  3Comments

3CordGuy picture 3CordGuy  Â·  3Comments