0

I am trying to install react-native. I have followed all the steps here:https://facebook.github.io/react-native/docs/getting-started.html#content

When I use this command :

react-native newProject

I am getting error as:

-bash: react-native: command not found.

I think incorrect path is the source of this error, but I don't know how to correct it. Any help is greatly appreciated

I have taken a look at this question but couldn't follow:Error when installed react-native-cli command not found

3
  • Have you installed react-native using the -g option? Commented Aug 28, 2015 at 9:32
  • yes i have installed with the -g option Commented Aug 28, 2015 at 15:22
  • Did you install any of the components (homebrew, io.js, nvm, react-native) with sudo / su? Commented Aug 28, 2015 at 18:56

1 Answer 1

1

I searched extensively and a few possible errors that could solve this issue is:

  1. update and upgrade brew(the latter takes quite some time so be patient)

  2. uninstall and re-install node-npm(brew install node)

After you re-install npm/node restart your computer,

  1. npm install -g react-native-cli (install the cli stuff again now)

Now it should work

I think reinstalling node worked for me(remember to reboot the system)

Hope this helps

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.