Some time ago, I had the command not found error when running expo, so I set path at ~/.bash_profile
and so, after running source ~/.bash_profile, now I can call expo without problems.
Today, I tried running react-native link and the following error appeared: zsh: react-native command not found
What else could I be doing wrong?
Maybe you don't have react native cli installed globally, which is good as it's not needed.
Check in the project directory if react-native is installed so ./node_modules/react-native/
should exist and has something inside.
If so, you don't need to run react-native
directly; try running through npx react-native
or npm script.
If not, make sure you have react-native in package.json
dependencies section, and run npm install
to pull the react-native library folder.
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.