npmandroid95% confidence\u2191 219

react-native: command not found

Full error message
I am getting -bash: react-native: command not found error while creating a react-native project.

Below are the additional info

1. brew --version
   homebrew 0.9.9
2  brew info watchman
   watchman `enter code here`stable 4.50
   /usr/local/Cellar/watchman/4.4.0
3. brew info flow
   stable 0.24.1
   /usr/local/Cellar/flow/0.24.1
4. brew info node
   stable 6.1.0
   /usr/local/Cellar/node/6.1.0
5. npm -version
   3.8.6
6. echo $PATH
/Users/Ashok/.rbenv/shims:/Users/Ashok/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I tried the suggested steps from this link but I am still getting the same error.

I don't have any "npm" directory which they have specified in the solution

Ashoks-MacBook-Pro:share Ashok$ ls
aclocal     doc     info        ruby-build  zsh
autoconf    emacs       man     systemtap

But I found npm file exists in the below location.

/usr/local/Cellar/node/6.1.0/etc/bash_completion.d

I uninstalled react-native and installed it again but I am still facing the same issue.

After adding right path to the PATH variable issue is resolved. Below are the steps to find the right path. 1. Enter: npm install -g react-native-cli output: /usr/local/Cellar/node/6.1.0/libexec/npm/bin/react-native ->/usr/local/Cellar/node/6.1.0/libexec/npm/lib/node_modules/react-native-cli/index.js/usr/local/Cellar/node/6.1.0/libexec/npm/lib └── [email protected] from above output you can clearly see the path: /usr/local/Cellar/node/6.1.0/libexec/npm/bin/react-native export PATH="/usr/local/Cellar/node/6.1.0/libexec/npm/bin:$PATH" react-native init appName cd appName react-native run-ios if you getting xcrun: error: unable to find utility "simctl" at this stage you can reslove using below steps XCode -> Preferences -> Locations -> Command Line Tools -> Choose Xcode 7.2.1 You can find original solution from xcrun unable to find simctl Thanks to @fbozo That's It!!!

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/5a22d5c79c365d09ab2954c474c0b14076be5bb82ff13848a24898c88d33b46f
hash \u00b7 5a22d5c79c365d09ab2954c474c0b14076be5bb82ff13848a24898c88d33b46f
react-native: command not found — DepScope fix | DepScope