I install the react-native
I install the nodejs
I set the paths
When i do sudo react-native init AwesomeProject
give me react-native: command not found
2 Answers
You need to run npm install -g react-native-cli
first.
See http://facebook.github.io/react-native/docs/getting-started.html
-
Hi,i did the same problem,i unistall and install it again but nothing $ sudo npm install -g react-native-cli /home/wink/.npm-global/bin/react-native -> /home/wink/.npm-global/lib/node_modules/react-native-cli/index.js /home/wink/.npm-global/lib └── [email protected] $ react-native init AwesomeProject react-native: command not found Commented Nov 28, 2016 at 13:52
-
Does the new answer on this page help? Try adding /home/wink/.npm-global/lib/node_modules/react-native-cli/ to the $PATH. Commented Nov 30, 2016 at 17:14
https://github.com/facebook/react-native/issues/3974
The above thread have conversation that solved my problem earlier when i faced the same issue. Maybe you will need to add the path manually. Add User/[your-user]/npm/bin to the $PATH.