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

can't install blog starter project #1899

Closed
AntonEmery opened this issue Aug 24, 2017 · 19 comments
Closed

can't install blog starter project #1899

AntonEmery opened this issue Aug 24, 2017 · 19 comments

Comments

@AntonEmery
Copy link

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 eslint-config-fbjs@1.1.1 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

@KyleAMathews
Copy link
Contributor

What happens when you run gatsby develop?

@AntonEmery
Copy link
Author

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

@KyleAMathews
Copy link
Contributor

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

@AntonEmery
Copy link
Author

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
│ └─┬ react-helmet@5.1.3
│ ├── deep-equal@1.0.1
│ ├── object-assign@4.1.1
│ └─┬ react-side-effect@1.1.3
│ ├── exenv@1.2.2
│ └── shallowequal@1.0.2
└── prettier@1.5.3

npm WARN eslint-config-fbjs@1.1.1 requires a peer of babel-eslint@^6.1.2 but none was installed.
npm WARN eslint-config-fbjs@1.1.1 requires a peer of eslint@^3.0.0 but none was installed.
npm WARN eslint-config-fbjs@1.1.1 requires a peer of eslint-plugin-babel@^3.3.0 but none was installed.
npm WARN eslint-config-fbjs@1.1.1 requires a peer of eslint-plugin-flowtype@^2.15.0 but none was installed.
npm WARN eslint-config-fbjs@1.1.1 requires a peer of eslint-plugin-react@^5.2.2 but none was installed.
npm WARN gatsby-starter-default@1.0.0 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!

@jquense
Copy link
Contributor

jquense commented Aug 24, 2017

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

@KyleAMathews
Copy link
Contributor

I reverted the CLI changes for now so this issue should be fixed #1903

@smaurstad
Copy link

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."

@KyleAMathews
Copy link
Contributor

Do other starters fail in similar ways?

@lebarde
Copy link

lebarde commented Nov 25, 2017

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

@KyleAMathews
Copy link
Contributor

Could you try upgrading gatsby-cli to the latest?

@gbailey4
Copy link

It works for me upon upgrading!

@amouratoglou
Copy link

amouratoglou commented Jan 11, 2018

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  

@abhinavjonnada82
Copy link

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

@boryskuczkowski
Copy link

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.

@webbson
Copy link

webbson commented Apr 19, 2018

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

@dsteinel
Copy link

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

🎉

@webbson
Copy link

webbson commented Apr 23, 2018

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

@yodacom
Copy link

yodacom commented May 10, 2018

yes Yarn seems to help!

@GraemeFulton
Copy link

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 serve@6.5.8: 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

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