Setup instructions result in "create-react-app: command not found"
Following the simple setup instructions yields:
-bash: create-react-app: command not found
mac os x 10.11.5, node 6.2, npm 3.8.9
Can you try running npm install -g create-react-app again and paste the output?
Thanks.
I’ll close because there is not enough information to help you.
$ npm install -g create-react-app (node:1306) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. /usr/local/bin/create-react-app -> /usr/local/lib/node_modules/create-react-app/index.js /usr/local/lib └─┬ [email protected] ├─┬ [email protected] │ ├── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ └── [email protected] │ ├── [email protected] │ └── [email protected] ├─┬ [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] │ │ └── [email protected] │ └─┬ [email protected] │ └── [email protected] ├── [email protected] └── [email protected]
@3nki Are you able to call any other global Node utilities (e.g. try npm install -g gulp and then call gulp). If not, it’s likely an issue with /usr/local/bin/ not being in your PATH, and you’d need to fix that.
aha! yup, that seems to have fixed it – thnx!
Hi!
I have the same issue. I've added /usr/local/bin and usr/local/bin/npm to path but the problem persists.
You need to figure out where global modules get installed. For example if you don't have /usr/local/bin/create-react-app, figure out where it is. Then add this folder to your PATH.
In case yarn global add create-react-app has been used, I found create-react-app here https://github.com/yarnpkg/yarn/issues/1151#issuecomment-269195959
ls ~/.config/yarn/global/node_modules/.bin
figure out where $PATH is then export it in your .bashrc file and call it in your .profile file like this
I solved the problem by adding C:\Users\ugur\AppData\Roaming\npm to windows PATH variable.
echo 'export PATH="$HOME/.npm-packages/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
For others who are still having an issue and the above solutions haven't work, take a look at this. I found that Gulp was not working as well and it led me to this fix. Run. $ npm config set prefix /usr/local And then reinstall react. $ npm install -g create-react-app The command should work now. $ create-react-app my-app
Happy coding.
Thanks @vandoan, that worked for me. Although I'd tried :
/Users/username/.npm-global/lib/node_modules/create-react-app/index.js my-app and worked as well.
Cheers
hey, I had also same problem so I fixed it by reinstalling nodejs of v6.11.3
hope it will helpful for you guys. :)
@luckyGoodBoy It seems that reinstalling NodeJS (in Windows, at least) adds Node and NPM modules into the PATH environment variables, which is probably what solved the problem behind the scenes for you: 
For windows 10, add C:\Users{your username}\AppData\Roaming\npm to system path solve this problem.
thanks vandoan...your fix worked out for me.
try with the command , sudo npm install -g create-react-app , and then create-react-app mywebapp without capital letters, if this don´t work whit the command nano /etc/paths add /usr/local/bin and /usr/local/bin/create-react-app and try other time, is worked in my mac whit Mac OS High Sierra.
Thanks @vandoan It worked for me
sudo npm install -g create-react-app appname
where "appname" is what you want your app to be named