Gatsby: can't install blog starter project

Created on 24 Aug 2017  Â·  19Comments  Â·  Source: gatsbyjs/gatsby

Hi, I'm new Gatsby, trying get it setup so i can rebuild my portfolio site. I'm going through the Getting Started steps. I installed the CLI no problem but then when I run gatsby new gatsby-site I am getting a bunch of errors.
UNMET PEER DEPENDENCY react@>=15.0.0 and several errors saying [email protected] requires peers that were not installed. I am on OSX and have the latest version of Node.

I added react to my dependencies but still no luck running gatsby develop Thanks, let me know if i can provide more information

All 19 comments

What happens when you run gatsby develop?

There was a problem loading the local develop command. Gatsby may not be installed.
Error: Cannot find module 'gatsby/dist/commands/develop'

Can you try updating to the latest version of gatsby-cli and try creating a new site?

Sure thing. I updated the gatsby-cli and ran gatsby new gatsby-site This is what I got.

├── UNMET PEER DEPENDENCY react@>=15.0.0
│ └─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]

npm WARN [email protected] requires a peer of babel-eslint@^6.1.2 but none was installed.
npm WARN [email protected] requires a peer of eslint@^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-babel@^3.3.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-flowtype@^2.15.0 but none was installed.
npm WARN [email protected] requires a peer of eslint-plugin-react@^5.2.2 but none was installed.
npm WARN [email protected] No repository field.

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/8.4.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v8.4.0
npm ERR! npm v3.10.3
npm ERR! path /Users/anton/Web Dev/Gatsby/gatsby-site/node_modules/gatsby/bin/gatsby.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/anton/Web Dev/Gatsby/gatsby-site/node_modules/gatsby/bin/gatsby.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/anton/Web Dev/Gatsby/gatsby-site/node_modules/gatsby/bin/gatsby.js'

Thanks!

Need to update the local gatsby as well, maybe we should have had a fallback for the older locations

I reverted the CLI changes for now so this issue should be fixed https://github.com/gatsbyjs/gatsby/pull/1903

Hi guys,

This whole gatsby project is so cool! I´ve been avay from coding since LAMP stack days, but this whole javascript movement makes me want to get back into coding again. I would love to meet Kyle and see if I can help. Then a small bug probably or something with my setup:

I tried installing gatsby on my MAC OS Sierra, v10.12
I do get the standard install & gatsby new "my-name-of-test-site" to work,
and the gatsby develop command works inside of that testsite. So all good.
But when I try to test the "gatsby new my-project https://github.com/saschajullmann/gatsby-starter-gatsbythemes" the gatsby develop command inside the "my-project" directory give this output: "error There was a problem loading the local develop command. Gatsby may not be installed."

Do other starters fail in similar ways?

Hello @KyleAMathews, same for me here:

$ gatsby new test_gatsby https://github.com/gatsbyjs/gatsby-starter-hello-world
[lots of things here]
$ du -Pshx test_gatsby/
381M
$ cd test_gatsby/
$ gatsby develop
/usr/local/bin/gatsby develop

Options:
  -h, --help     Affiche de l'aide                                                                                                                   [booléen]
  --verbose      Turn on verbose output                                                                                              [booléen] [défaut: false]
  -H, --host     Set host. Defaults to 0.0.0.0                                                                       [chaine de caractère] [défaut: "0.0.0.0"]
  -p, --port     Set port. Defaults to 8000                                                                             [chaine de caractère] [défaut: "8000"]
  -o, --open     Open the site in your browser for you.                                                                                              [booléen]
  -v, --version  Affiche le numéro de version                                                                                                        [booléen]

error There was a problem loading the local develop command. Gatsby may not be installed.


  Error: Cannot find module 'address'

  - module.js:20 require
    internal/module.js:20:19

  - develop.js:223 Object.<anonymous>
    [test_gatsby]/[gatsby]/dist/commands/develop.js:223:15

  - module.js:20 require
    internal/module.js:20:19

  - create-cli.js:53 resolveLocalCommand
    [lib]/[gatsby-cli]/lib/create-cli.js:53:14

  - create-cli.js:70 Object.handler
    [lib]/[gatsby-cli]/lib/create-cli.js:70:22

  - command.js:233 Object.self.runCommand
    [lib]/[gatsby-cli]/[yargs]/lib/command.js:233:22

  - yargs.js:990 Object.Yargs.self._parseArgs
    [lib]/[gatsby-cli]/[yargs]/yargs.js:990:30

  - yargs.js:532 Object.Yargs.self.parse
    [lib]/[gatsby-cli]/[yargs]/yargs.js:532:23

  - create-cli.js:180 module.exports
    [lib]/[gatsby-cli]/lib/create-cli.js:180:154

  - index.js:121 Object.<anonymous>
    [lib]/[gatsby-cli]/lib/index.js:121:1

Could you try upgrading gatsby-cli to the latest?

It works for me upon upgrading!

worked for me ! before , I didn't get any error message, but the localhost sever didn't work.

➜  app npm update gatsby-cli 
➜  app gatsby develop  

All this can be solved........... By two simple steps actually three:
1.) Open GIT BASH
2.) Type the command: _gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-xxxxxx_
3.) And from your TERMINAL type _gatsby develop_

Same problem here
$ gatsby develop
error There was a problem loading the local develop command. Gatsby may not be installed. Perhaps you need to run "npm install"?

any ideas?

Latest gatsby-cli installed (actually tried it three times I think), still no luck.

I have the same problem as well, tried reinstall a couple of times without any luck.

Even though the gatsby-cli was installed globally (the command gatsby was also available globally and gave me some options), I ran into the very same issue:
error There was a problem loading the local develop command. Gatsby may not be installed. Perhaps you need to run "npm install"?

So here is what I did to resolve it:

  • npm uninstall gatsby-cli
  • npm install --global gatsby-cli
  • gatsby new gatsby-site
  • gatsby develop

🎉

For me the only solution that worked was to install it via yarn instead of npm.

yes Yarn seems to help!

I had the same problem and spotted this when running npm install --global gatsby-cli for the second time (after following @dsteinel's comments):

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=7.6.0". error Found incompatible module info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. error Command failed: yarnpkg

After upgrading node to 7.6.0, gatsby develop worked for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

3CordGuy picture 3CordGuy  Â·  3Comments

jimfilippou picture jimfilippou  Â·  3Comments

ferMartz picture ferMartz  Â·  3Comments

kalinchernev picture kalinchernev  Â·  3Comments

hobochild picture hobochild  Â·  3Comments