Gatsby: bash: gatsby: command not found on running "gatsby new gatsby-site"

Created on 16 Jan 2019  路  8Comments  路  Source: gatsbyjs/gatsby

Description

Describe the issue that you're seeing.
after running npm install --global gatsby-cli

I get something like this

$ npm i -g gatsby-cli
C:\Users\adity\AppData\Roaming\npm\gatsby -> C:\Users\adity\AppData\Roaming\npm\node_modules\gatsby-cli\lib\index.js
+ [email protected]
updated 1 package in 21.909s

but while trying to to run gatsby new gatsby-site

it gives

Actual result

bash: gatsby: command not found.

Environment

operating system  :   windows 10
 $ node --version
    v10.12.0
  $ npm --version
    6.4.1

Run gatsby info --clipboard in your project directory and paste the output here. Not working? You may need to update your global gatsby-cli - npm install -g gatsby-cli

stale? question or discussion

Most helpful comment

I am so confused..

I have only two foders "bin" and "node_modules". there is no "bin" folder

@adityakmr7 you just said one of the two folders is "bin", then you say that there isn't a "bin" folder.. what?

That's awesome to hear! Have fun with gatsby!

@wardpeet ...what? Was there more context to this earlier that's been deleted? OP hasn't confirmed they've solved the issue have they? What's awesome to hear?

All 8 comments

Is any actual gatsby command working for you? Did you open a new terminal/console window to try the command?

At C:\Users\adity\AppData\Roaming\npm You should have a bin folder I think for global modules, and there should be a gatsby file there, go to that location and try the gatsby command again, it should work then, if that's the case then you need this bin directory in your PATH variable, which would be an issue with the way you installed Node/NPM rather than gatsby.

Is any actual gatsby command working for you? Did you open a new terminal/console window to try the command?

At C:\Users\adity\AppData\Roaming\npm You should have a bin folder I think for global modules, and there should be a gatsby file there, go to that location and try the gatsby command again, it should work then, if that's the case then you need this bin directory in your PATH variable, which would be an issue with the way you installed Node/NPM rather than gatsby.

I have only two foders "bin" and "node_modules". there is no "bin" folder

That's awesome to hear! Have fun with gatsby!

I am so confused..

I have only two foders "bin" and "node_modules". there is no "bin" folder

@adityakmr7 you just said one of the two folders is "bin", then you say that there isn't a "bin" folder.. what?

That's awesome to hear! Have fun with gatsby!

@wardpeet ...what? Was there more context to this earlier that's been deleted? OP hasn't confirmed they've solved the issue have they? What's awesome to hear?

Shouldn't be closed. Currently getting the same issue on Mac with a fresh install.

I probably was on a different issue and probably just messed up while commenting. Sorry about this.

@adityakmr7

I have only two foders "bin" and "node_modules". there is no "bin" folder

seems like you have a bin folder? could you echo out your $PATH variable. Run echo $PATH.

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 馃挭馃挏

Hey again!

It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.

Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonmp picture brandonmp  路  3Comments

mikestopcontinues picture mikestopcontinues  路  3Comments

3CordGuy picture 3CordGuy  路  3Comments

signalwerk picture signalwerk  路  3Comments

theduke picture theduke  路  3Comments