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

Community
  • 1
  • 1
L887
  • 312
  • 1
  • 4
  • 15

1 Answers1

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

L887
  • 312
  • 1
  • 4
  • 15