Open cypris75 opened 5 years ago
I had this issue as well. @azhang is right pointing you to #62. You can use nvm to run with local NodeJS version 10.
I can't get this to work even on node 10. Any ideas on what to do?
gatsby new ivanstorck-gatsby-blog https://github.com/greglobinski/gatsby-starter-hero-blog.git
info Creating new site from git: https://github.com/greglobinski/gatsby-starter-hero-blog.git
Cloning into 'ivanstorck-gatsby-blog'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 768 (delta 0), reused 1 (delta 0), pack-reused 767
Receiving objects: 100% (768/768), 9.29 MiB | 29.00 MiB/s, done.
Resolving deltas: 100% (374/374), done.
success Created starter directory layout
info Installing packages...
yarn install v1.13.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
warning multiyargs@1.0.0: The engine "yargs" appears to be invalid.
[3/4] π Linking dependencies...
warning "antd > rc-editor-mention@1.1.6" has unmet peer dependency "immutable@^3.7.4".
warning " > eslint-plugin-graphql@2.1.1" has unmet peer dependency "graphql@^0.12.0 || ^0.13.0".
warning " > url-loader@1.1.1" has unmet peer dependency "webpack@^4.0.0".
warning "gatsby-plugin-netlify > webpack-assets-manifest@3.0.2" has unmet peer dependency "webpack@>=4.0.0".
warning " > gatsby-plugin-styled-jsx@3.0.1" has incorrect peer dependency "styled-jsx@^3.0.2".
warning " > react-addons-perf@15.4.2" has incorrect peer dependency "react-dom@^15.4.2".
warning "react-instantsearch > react-instantsearch-native@5.2.2" has unmet peer dependency "react-native@>= 0.32.0".
warning "react-instantsearch > react-instantsearch-core > algoliasearch-helper@2.26.1" has unmet peer dependency "algoliasearch@>= 3.1 < 4".
warning " > postcss-cssnext@3.1.0" has unmet peer dependency "caniuse-lite@^1.0.30000697".
[4/4] π¨ Building fresh packages...
[-/9] β waiting...
[-/9] β waiting...
[3/9] β sharp
[8/9] β sharp
error /Users/ivan/dev/ivanstorck-gatsby-blog/node_modules/sharp-cli/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/ivan/dev/ivanstorck-gatsby-blog/node_modules/sharp-cli/node_modules/sharp
Output:
info sharp Detected globally-installed libvips v8.7.4
info sharp Building from source via node-gyp
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/ivan/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/ivan/dev/ivanstorck-gatsby-blog/node_modules/sharp-cli/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/ivan/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/ivan/.node-gyp/10.15.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/ivan/.node-gyp/10.15.1',
gyp info spawn args '-Dnode_gyp_dir=/Users/ivan/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/ivan/.node-gyp/10.15.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/ivan/dev/ivanstorck-gatsby-blog/node_modules/sharp-cli/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
CXX(target) Release/obj.target/sharp/src/metadata.o
../src/metadata.cc:86:28: error: use of undeclared identifier 'VIPS_META_IPCT_NAME'
if (image.get_typeof(VIPS_META_IPCT_NAME) == VIPS_TYPE_BLOB) {
^
../src/metadata.cc:88:43: error: use of undeclared identifier 'VIPS_META_IPCT_NAME'
void const *iptc = image.get_blob(VIPS_META_IPCT_NAME, &iptcLength);
^
2 errors generated.
make: *** [Release/obj.target/sharp/src/metadata.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/ivan/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/ivan/.nvm/versions/node/v10.15.1/bin/node" "/Users/ivan/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ivan/dev/ivanstorck-gatsby-blog/node_modules/sharp-cli/node_modules/sharp
error Command failed: yarnpkg
Error: Command failed: yarnpkg
- index.js:236 Promise.all.then.arr
[lib]/[gatsby-cli]/[execa]/index.js:236:11
- From previous event:
- index.js:207 handlePromise
[lib]/[gatsby-cli]/[execa]/index.js:207:5
- index.js:275 ChildProcess.spawned.then
[lib]/[gatsby-cli]/[execa]/index.js:275:46
- From previous event:
- init-starter.js:123 install
[lib]/[gatsby-cli]/lib/init-starter.js:123:18
- init-starter.js:189
[lib]/[gatsby-cli]/lib/init-starter.js:189:11
- Generator.next
- From previous event:
- From previous event:
- init-starter.js:225
[lib]/[gatsby-cli]/lib/init-starter.js:225:18
- create-cli.js:254 cli.command.handler.handlerP
[lib]/[gatsby-cli]/lib/create-cli.js:254:14
- create-cli.js:16 Object.args [as handler]
[lib]/[gatsby-cli]/lib/create-cli.js:16:19
- command.js:235 Object.runCommand
[lib]/[gatsby-cli]/[yargs]/lib/command.js:235:44
- yargs.js:1046 Object.parseArgs [as _parseArgs]
[lib]/[gatsby-cli]/[yargs]/yargs.js:1046:30
- yargs.js:551 Object.parse
[lib]/[gatsby-cli]/[yargs]/yargs.js:551:25
- create-cli.js:258 module.exports.argv
[lib]/[gatsby-cli]/lib/create-cli.js:258:157
- index.js:103 Object.<anonymous>
[lib]/[gatsby-cli]/lib/index.js:103:1
- loader.js:689 Module._compile
internal/modules/cjs/loader.js:689:30
- loader.js:700 Object.Module._extensions..js
internal/modules/cjs/loader.js:700:10
- loader.js:599 Module.load
internal/modules/cjs/loader.js:599:32
- loader.js:538 tryModuleLoad
internal/modules/cjs/loader.js:538:12
- loader.js:530 Function.Module._load
internal/modules/cjs/loader.js:530:3
- loader.js:742 Function.Module.runMain
internal/modules/cjs/loader.js:742:12
- node.js:283 startup
internal/bootstrap/node.js:283:19
- node.js:743 bootstrapNodeJSCore
@ivanoats I had a similar issue with Node v10.13.0
when installing these dependencies, after down grading to v8.11.3
, the installation would succeed. Hope this helps!
Running Node v10.15.1 on Elementary OS Loki required
sudo apt-get install -y g++ cmake
to get gatsby develop
working properly
When will we be able to use it with a more recent version of npm
I can't get this working with node 13,12,10 or 8.. I am getting the @ivanoats error, any ideas?
I just did a simple
gatsby new test-project https://github.com/greglobinski/gatsby-starter-hero-blog.git
and rungatsby develop
afterwards but the script stops aftersuccess onPostBootstrap
and does not respond anymore:Full output:
Local NodeJs version is 11.2.0 and npm is 6.4.1 (on Mac)
Installing the
gatsby-starter-default
starter and runninggatsby develop
works without issues.