2

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

Harshal Bhamare
  • 372
  • 1
  • 6
  • 17
Franko Loshe
  • 109
  • 2
  • 12

2 Answers2

5

You need to run npm install -g react-native-cli first.

See http://facebook.github.io/react-native/docs/getting-started.html

Martin Konicek
  • 39,126
  • 20
  • 90
  • 98
  • 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 └── react-native-cli@1.3.0 $ react-native init AwesomeProject react-native: command not found – Franko Loshe Nov 28 '16 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. – Martin Konicek Nov 30 '16 at 17:14
1

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.

rajaishwary
  • 4,362
  • 2
  • 14
  • 14