1

I Install node and Watchman

 brew install node
 brew install watchman

then Install React Native CLI

npm install -g react-native-cli

but when I use react-native init test

I have error: -bash: react-native: command not found

2 Answers 2

1

try: sudo npm install -g react-native-cli

or npx before react native as: npx react-native init demo

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

Comments

0

first
sudo npm install -g react-native-cli

this command output path like this

/usr/local/bin/react-native -> /usr/local/lib/node_modules/react-native-cli/index.js

then(for above path example)

export PATH="/usr/local/lib/node_modules/react-native-cli/index.js"

react-native init appName

1 Comment

I do all this but again -bash: react-native: command not found

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.