0

I installed react native cli and other packages, but can't create a react native project?

-bash: react-native: command not found

My terminal process screenshot added.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • You can check the link to solve your problem https://stackoverflow.com/questions/37189081/react-native-command-not-found – Prabhu May 23 '18 at 07:08

2 Answers2

1

You have to install react native cli in global. You can use this to do that

npm install react-native-cli -g
Ali SabziNezhad
  • 3,050
  • 1
  • 17
  • 31
0

I was having a lot of trouble with this, as none of the other answers provided were working. The top answer here was what allowed me to get through my problem: npm global path prefix.

If you get a subsequent EACCES permissions problem, use this so as to not having to go back to square one to fiddle with the npm default directory again:

sudo npm install -g --unsafe-perm=true --allow-root