Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Initial "gatsby develop" fails #67

Open
cypris75 opened this issue Nov 28, 2018 · 7 comments
Open

Initial "gatsby develop" fails #67

cypris75 opened this issue Nov 28, 2018 · 7 comments

Comments

@cypris75
Copy link

cypris75 commented Nov 28, 2018

I just did a simple gatsby new test-project https://github.com/greglobinski/gatsby-starter-hero-blog.git and run gatsby develop afterwards but the script stops after success onPostBootstrap and does not respond anymore:

Full output:

$ gatsby new test-project 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 'test-project'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 748 (delta 0), reused 2 (delta 0), pack-reused 743
Receiving objects: 100% (748/748), 9.29 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (360/360), done.
success Created starter directory layout
info Installing packages...
yarn install v1.12.3
[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...
✨  Done in 102.44s.


$ gatsby develop
success open and validate gatsby-config — 0.014 s
success load plugins — 0.421 s
success onPreInit — 1.498 s
success delete html and css files from previous builds — 0.007 s
success initialize cache — 0.034 s
success copy gatsby files — 0.085 s
success onPreBootstrap — 0.010 s
success source and transform nodes — 0.263 s
success building schema — 0.332 s
success createPages — 0.078 s
success createPagesStatefully — 0.033 s
success onPreExtractQueries — 0.008 s
success update schema — 0.179 s
success extract queries from components — 0.167 s
success run graphql queries — 4.600 s — 28/28 6.09 queries/second
success write out page data — 0.005 s
success write out redirect data — 0.001 s
Generating image thumbnails [==============================] 287/287 36.1 secs 100%

info bootstrap finished - 43.369 s

success onPostBootstrap — 0.002 s

Local NodeJs version is 11.2.0 and npm is 6.4.1 (on Mac)

Installing the gatsby-starter-default starter and running gatsby develop works without issues.

@azhang
Copy link

azhang commented Dec 21, 2018

#62

Try on Node 10

@CEOehis
Copy link
Contributor

CEOehis commented Dec 28, 2018

I had this issue as well. @azhang is right pointing you to #62. You can use nvm to run with local NodeJS version 10.

@ivanoats
Copy link

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

@joyfulelement
Copy link

@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!

@shiruken1
Copy link

Running Node v10.15.1 on Elementary OS Loki required

sudo apt-get install -y g++ cmake

to get gatsby develop working properly

@Nxtra
Copy link

Nxtra commented Jan 29, 2020

When will we be able to use it with a more recent version of npm

@cordial
Copy link

cordial commented Feb 28, 2020

I can't get this working with node 13,12,10 or 8.. I am getting the @ivanoats error, any ideas?

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

No branches or pull requests

8 participants