I've installed create-react-app using this command:
sudo npm install -g create-react-app
but when I run:
create-react-app my-app
I get this:
-bash: create-react-app: command not found
I'm using OSX so I've updated the .bash_profile
to this as instructed after installing node
export PATH=$HOME/.node_modules_global/bin:$PATH
It's frustrating because it works perfectly fine on my other Mac and I've read countless forums trying to troubleshoot the issue. Can anyone shed some light on this issue for me without being rude?
I needed to add this to my .bash_profile
export PATH=$PATH:/Users/rafaelheard/.npm-packages/bin
then restart the Terminal
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.