. I was recently developing react-native with expo. I've got a real-native-cli thing to do. It was installed according to the description of the Internet. However, this error occurs in my pulse.
-bash:react-native: command not found
So I looked for the Internet to solve this error again, but... I don't know how to add a path.
If I type npm install -g react-native-cli,
It says...
/Users/bong/npm-global/bin/react-native -> Users/bong/npm-global/lib/node_modules/react-native-cli/index.js
Teachers... please solve my problem.. Thank you.
The /Users/bong/npm-global/bin/
path should be included in the PATH, this can be achieved by placing it in the .bashrc
or .bash_profile
file. This can be achieved by running the following command:
echo "export PATH=$PATH:/Users/bong/npm-global/bin" >> ~/.bashrc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.