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

gatsby new fails with starter: node-gyp rebuild fails #4121

Closed
brainwipe opened this issue Feb 18, 2018 · 1 comment
Closed

gatsby new fails with starter: node-gyp rebuild fails #4121

brainwipe opened this issue Feb 18, 2018 · 1 comment

Comments

@brainwipe
Copy link

Description

When running gatsby new on the gatsby-material-starter, sharp fails.

Environment

Gatsby version: 1.1.40
Node.js version: 9.5.0
Operating System: Ubuntu 16.04.2 xenial LTS running as admin rights on the Windows Subsystem. x64 with node running as x64.

Actual result

brainwipe@Beaker:/mnt/g/Web$ gatsby new icar2 https://github.com/Vagr9K/gatsby-material-starter
info Creating new site from git: https://github.com/Vagr9K/gatsby-material-starter.git
Cloning into 'icar2'...
remote: Counting objects: 1817, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 1817 (delta 2), reused 5 (delta 1), pack-reused 1804
Receiving objects: 100% (1817/1817), 2.83 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (1037/1037), done.
Checking connectivity... done.
success Created starter directory layout
info Installing packages...
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

> uws@9.14.0 install /mnt/g/Web/icar2/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> sharp@0.19.0 install /mnt/g/Web/icar2/node_modules/sharp
> node-gyp rebuild

make: Entering directory '/mnt/g/Web/icar2/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
make: g++: Command not found
sharp.target.mk:120: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 127
make: Leaving directory '/mnt/g/Web/icar2/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.4.0-43-Microsoft
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/g/Web/icar2/node_modules/sharp
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN postcss-html@0.12.0 requires a peer of postcss-less@>=1.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-html@0.12.0 requires a peer of sugarss@>=1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gatsby-starter-material@1.1.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.19.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.19.0 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!     /home/brainwipe/.npm/_logs/2018-02-18T15_57_09_792Z-debug.log
error Command failed: npm install

Note, I did manage to get a gatsby new site (empty) running. It appears to be some of the dependencies that are failing.

Expected behavior

I get a new site.

Steps to reproduce

1. Follow gatsby tutorial 1
2. Type gatsby new icar2 https://github.com/Vagr9K/gatsby-material-starter into console.

Thank you!

@brainwipe
Copy link
Author

Hang on! Please don't spend any time on this issue just yet; I don't have g++ installed. Let me work out of for now; understand why and I'll update this thread and docs (better specification in pre-requisites I imagine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant