-
-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
bash: create-react-app: command not found #1182
Comments
Hi! The log you posted says it got installed to |
I’ll close because the problem is not specific to CRA—you’d have the same issue with any global Node command. That you need I hope that #1182 (comment) will fix your issue. |
Was the idea to paste your code overtop of the current entry, or add it in addition to? Replacing it with the snippet above made no change. I found your package as part of a tutorial and the instructor told me to use sudo. I know this is undoubedley a pain for you but I really have trouble with the Node docs as a beginner and can't navigate them. |
Yeah I understand. I'm not good with this either. When I was installing Node for the first time I think I used
Likely in addition to. What does |
So I unistalled node and npm again. Reinstalled non-homebrew. Put Tried to install react-app. Had a permission error, basic one.
Fixed the permissions error and the package installed properly. Found the package in appropriate folder. Still: |
You need to figure out where |
This has been solved. It was a problem in bash profile. |
Great, I'm glad you got it working! |
How did you fix your bash profile? |
Why are U having a similar problem? |
Yes I am |
The problem was not with CRA, but with node/npm. Installing Node from scratch, non-homebrew, I put these in my bash_profile. And it worked.
|
@gaearon how would I solve this on Windows? |
No idea. Never used Windows. I'd only be throwing out random guesses. Try reinstalling node. If it installs properly this should clear up the CLI issue. Is npm/node working properly? |
When I was testing Windows support I followed Node installation instructions and then launched "Node.js command prompt" that appeared in the Start menu. This worked for me, and I could launch |
For anyone else with this problem on Windows, I found the following instructions that worked for me: (from this link http://stackoverflow.com/questions/19874582/change-default-global-installation-directory-for-node-js-modules-in-windows)
After this I reinstalled |
Can you reproduce the problem with latest npm?
I have had alot of problems getting npm installed overall and spent around 6 hours getting to the point where I think it is installed now. I run npm -v and get a number, likewise for node.
All packages were working and I had to update to use your package. I could not, so deleted with all packages and tried to reinstall new version. After regular way failed I was able to get it installed, node and Npm, with homebrew after I made a few permissions changes (with difficulty).
Description
I've tried several different ways of getting this to work but I always get the error above.
This is what I got when I installed the package-
`sudo npm install -g create-react-app (I also tried non-sudo)
/Users/name/.npm-packages/bin/create-react-app -> /Users/name/.npm-packages/lib/node_modules/create-react-app/index.js
/Users/name/.npm-packages/lib`
I looked in the the node_modules and the package is there. I've added this-
export PATH="./node_modules/.bin:$PATH"
and also I tried it with the full path. It did not work.I am not great with bash_profile, permissions, etc. so I can't figure out what I need to do. If this is a node problem I apologize but I still need help regardless.
Run these commands in the project folder and fill in their results:
npm ls react-scripts
- npm ERR! code 1-bash: /Users/name/Desktop/code_work/react_lynda/bulletin_board: is a directory
node -v
: - 7.2.0npm -v
: -3.10.9Then, specify:
The text was updated successfully, but these errors were encountered: