-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby: command not found after npm install #15276
Comments
It does seem like globally installed packages for some reason not work in your environment :/ Here's another article worth to go through: https://medium.com/@jagatjyoti.1si13cs040/npm-g-install-npm-package-not-working-as-desired-why-why-why-19795abf0b59 If this won't help, there is workaround this that you can try - instead of trying to install and use globally installed
etc. or add commands to
and run them with
|
Thank's a lot! I solved my problem :) It was a global installation problem indeed! |
Oh my God ! It worked ...... Thanks @pieh |
I know this is an older post, but being that it showed up first in my search I figured I'd share my solution. My global packages on my Windows10 (Work machine, I'd much rather a Mac) are set to install at the below path. /c/Users/{username}/AppData/Roaming/npm So I added this to my PATH variable and now it finds the installation. You can search for "Environment Variables", click Path and add the path there, or if you're like me and don't have admin rights you can add via Git Bash in Windows like below. PATH=$PATH:/c/Users/{username}/AppData/Roaming/npm You can also create an Bash alias and have it automatically run when you start Git Bash. |
This is what worked for me pretty easily: |
worked for me i was trying in gatsby new |
Hello , this command work like a charm for me 👍 i'm on w10 with ubuntu terminal on windows terminal " sudo npm install gatsby-cli -g" resolve my problem " "Gatsby: command not found" on trying to run Gatsby command after installing npm install --global gatsby-cli" 👍 for the information , still have this : but "gatsby new test-gatsby" work for me
however still working how to resolve this
after install gatsby ❯ gatsby --version |
When I try to install gatsby running npm install 'gatsby-cli -g' , it does not work : when I run 'gatsby --help', it shows:
'bash:gatsby command not found'
I have tried:
I get a permission error when trying to change npm config set prefix /usr/local
I'm working on mac (version 10.14.5).
My environment details are as follows:
npm -v : 6.9.0
node -v : v10.16.0
As for permission, I already have an "export PATH=~/.npm-global/bin:$PATH" in a .bash_profile that is in my ~/.npm-global folder (https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).
What can I do to make it work?
Thanks in advance,
Marie
The text was updated successfully, but these errors were encountered: