0

I've followed these steps but I still can't create a react-native app

for MacOS

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Install Node

brew install node

Install watchman

brew install watchman

Finally install React Native CLI

npm install -g react-native-cli


/usr/local/Cellar/node/11.7.0/lib
└─┬ [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected] deduped
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ └── [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   └─┬ [email protected]
  │ │     ├── [email protected]
  │ │     ├─┬ [email protected]
  │ │     │ ├── [email protected] deduped
  │ │     │ └── [email protected]
  │ │     ├── [email protected]
  │ │     ├─┬ [email protected]
  │ │     │ └─┬ [email protected]
  │ │     │   ├── [email protected]
  │ │     │   └── [email protected]
  │ │     ├─┬ [email protected]
  │ │     │ └── [email protected] deduped
  │ │     └── [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected] deduped
  │   ├── [email protected]
  │   ├── [email protected]
  │   ├── [email protected]
  │   ├── [email protected]
  │   ├── [email protected]
  │   └── [email protected]
  └── [email protected]

1 Answer 1

0

Use are using

react-native init

to create the project, right?

Otherwise, make sure it's in your PATH. See the following:

-bash: react-native: command not found

6
  • yes I'm using init, how do I check if it's in my path and if not how do I get it there? Commented Jan 20, 2019 at 19:10
  • I added a link to another article in my answer. Commented Jan 20, 2019 at 19:13
  • I tried running export PATH="/usr/local/share/npm/bin:$PATH" this is my path: /usr/local/share/npm/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/cynthia/.rvm/gems/ruby-2.4.2/bin:/Users/cynthia/.rvm/gems/ruby-2.4.2@global/bin:/Users/cynthia/.rvm/rubies/ruby-2.4.2/bin:/Users/cynthia/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/cynthia/.rvm/bin Commented Jan 20, 2019 at 19:41
  • You'll need to double check the location of react-native. What do you get when you run react-native? Command not found? Commented Jan 20, 2019 at 19:51
  • yeah still Command not found. I tried to reset my path and reinstall everything. My new path is: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/npm/bin. How do I check where react-native is? Commented Jan 20, 2019 at 20:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.