-
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" on trying to run Gatsby command after installing npm install --global gatsby-cli #4967
Comments
Does |
Yes it shows: gatsby-cli@1.1.50 |
is it like gatsby is not supported on linux ? |
Lots of people use gatsby on Linux. Check if other npm global binaries work there. |
other npm binaries work fine. |
Not sure. Perhaps try uninstalling and then reinstalling gatsby-cli. Regardless, this is an npm install problem it sounds like not anything with gatsby. Lots of people are using gatsby on Linux and we regularly test on linux. If you do discover something specific that's causing trouble with your environment, please open a new issue and we'll try to fix it. |
i tried cloning the main repo and ran npm install which gave me a npm warning : npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): |
fsevents is a Mac dependency so the message is saying npm won't install it. |
After some trial & error, I finally found the solution. You have to change the and then when I re-ran npm root -g, I got the correct root folder: /usr/local/lib/node_modules |
@pereiraryan Gotcha! |
@pereiraryan can you advise what you did more step-by-step? I am having the same issue. |
@bfeldman89 Here are the steps I took that resolved the issue for me as well based on @pereiraryan's steps. Step 1 - Set ConfigIf you are using npm config delete prefix since Otherwise, if you don't use npm config set prefix /usr/local Step 2 - Install GatsbyInstall npm i -g gatsby-cli Step 3 - Verify InstallationVerify gatsby is installed correctly by listing all the packages you have installed globally at the first level (so not dependencies) npm -g ls --depth=0 which should output something like this /usr/local/lib
└── gatsby-cli@1.1.58 Step 4 - HuzzahSuccess! Now you can use
|
This fixed issue for me |
Thanks @pereiraryan and @fvcproductions, solved it for me as well. |
@mcstean |
This issue in creating a new gatsby site is still appearing, I reinstalled gatsby-cli as global again and over again ... `gatsby new lovely-gatsby-site No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! error Command failed: yarnpkg Error: Command failed: yarnpkg
|
@DSchau please scan you advise on a book or basic stuffs beginners should master to easily find their way ? |
@mcstean what exactly are you looking for? Specifically in re: to Gatsby, or more unix-like stuff? |
@DSchau More Unix like as I admit also Being a fan. |
Oh god, how do I set it back to what it was. I Followed @fvcproductions instructions and the errors i'm getting no matter what I run or in what project i'm in are: ` TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined So even my projects that were working using the normal "create-react-app" dont work. |
I'm seeing this as well ("command not found: gatsby" upon running OS X here, with npm 6.4.1 and 11.3.0. Node is installed via homebrew, so my value for prefix is |
This worked great for me but I had to manually go into the npmrc file because my path has a space between the file. So if anybody else has the issue where their npm breaks because of this, try the following.
|
Moved to new machine recently, just installing Gatsby CLI globally should fix this. |
I was also getting same error but my issue has resolved by using cammand with sudo |
Hello, When I run gatsby --version, I get a : -bash: gatsby: command not found. /Users/mariequittelier/npm/lib My environment details are as follows: What can I do to make it work? Thanks in advance, |
till step 3 it worked for me but but, after that when I write command gatsby new my-blog ,it says gatsby is not recognized as internal or external command. |
I am having the same problem. I have Windows 10 OS , the prefix is prefix=/usr/local after running command 'gatsby --version' it says ''gatsby' cannot be recognized as internal or external command. I installed gatsby cli successfully and when I run command -g ls --depth=0 it shows +-- gatsby-cli@2.8.10 |
I'm having the same issue! It's showing all good but when I run the command it says 'command not found'. Can anyone help? |
ok. lets try this. Go to your system environment variables and add environment variable as my-admin-account with value C:\Users\AppData\Roaming\npm. |
I've already set that value.
Any other things to debug? |
Finally fixed this. Gatsby installed at some other folder so adding the path to the environment variable solved the issue. Thanks! @rutikwankhade |
Thanks! |
I got this error `/usr/local/lib/node_modules/gatsby-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53 Error: Package exports for '/usr/local/lib/node_modules/gatsby-cli/node_modules/clipboardy' do not define a '.' subpath please help me. |
|
thansk worked for me |
Eres un subnormal qu eno tiene ni puta idea. La qu ehe liado por tú culpa.Inútil! |
npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @Hapi organization and moving back to 'joi' (hapijs/joi#2411) npm ERR! Unexpected end of JSON input while parsing near '...cies":{"react":"^16.1' npm ERR! A complete log of this run can be found in: what should i do |
When i use |
It said "empty" in my terminal, Do you have a solution for it? |
GATSBY FUCKING SUKS! you install the cli and then it fducking doesnt find |
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 |
To avoid having to use @SSylvain1989 Nothing in the blockquote seem like it's actually erroring (lots of warning are printed though). What's the error you are running into? (Please share full output even if it's hundreds of lines) |
Hello @jamo for this moment all works fine for me 😄 i have follow the instructions you mentionned and outpout is like below , so i think i'm ok ? 😃 ( sorry for my bad english talk ):
|
I had this problem when I ran All I did to fix was run |
On referring to the docs on gatsby page, Was not able to run the gatsby command for the new static site.
My environment details are as follows:
npm -v : 3.10.10
node -v : v6.14.1.
Operating System: Linux 4.4.0-119-generic (ubuntu 16.04)
These are the file structure on installing gastby cli
On entering the new create command : gatsby new gatsby-site
i get an error saying :gatsby: command not found
What am i doing wrong here.
The text was updated successfully, but these errors were encountered: