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
└─┬ react-native-cli@2.0.1
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.1.1
  │ ├─┬ strip-ansi@3.0.1
  │ │ └── ansi-regex@2.1.1 deduped
  │ └── supports-color@2.0.0
  ├── minimist@1.2.0
  ├─┬ prompt@0.2.14
  │ ├── pkginfo@0.4.1
  │ ├─┬ read@1.0.7
  │ │ └── mute-stream@0.0.8
  │ ├── revalidator@0.1.8
  │ ├─┬ utile@0.2.1
  │ │ ├── async@0.2.10
  │ │ ├── deep-equal@1.0.1
  │ │ ├── i@0.3.6
  │ │ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── ncp@0.4.2
  │ │ └─┬ rimraf@2.6.3
  │ │   └─┬ glob@7.1.3
  │ │     ├── fs.realpath@1.0.0
  │ │     ├─┬ inflight@1.0.6
  │ │     │ ├── once@1.4.0 deduped
  │ │     │ └── wrappy@1.0.2
  │ │     ├── inherits@2.0.3
  │ │     ├─┬ minimatch@3.0.4
  │ │     │ └─┬ brace-expansion@1.1.11
  │ │     │   ├── balanced-match@1.0.0
  │ │     │   └── concat-map@0.0.1
  │ │     ├─┬ once@1.4.0
  │ │     │ └── wrappy@1.0.2 deduped
  │ │     └── path-is-absolute@1.0.1
  │ └─┬ winston@0.8.3
  │   ├── async@0.2.10 deduped
  │   ├── colors@0.6.2
  │   ├── cycle@1.0.3
  │   ├── eyes@0.1.8
  │   ├── isstream@0.1.2
  │   ├── pkginfo@0.3.1
  │   └── stack-trace@0.0.10
  └── semver@5.6.0

1 Answers1

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

Joshua Obritsch
  • 1,253
  • 8
  • 14
  • yes I'm using init, how do I check if it's in my path and if not how do I get it there? – Cynthia Rittenbach Jan 20 '19 at 19:10
  • I added a link to another article in my answer. – Joshua Obritsch Jan 20 '19 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 – Cynthia Rittenbach Jan 20 '19 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? – Joshua Obritsch Jan 20 '19 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? – Cynthia Rittenbach Jan 20 '19 at 20:26
  • It depends. Didn't you say you installed it here? /usr/local/Cellar/node/11.7.0/lib Maybe you installed it as root? – Joshua Obritsch Jan 20 '19 at 20:34