react-native run-android is unrecognized react-native run-android is unrecognized android android

react-native run-android is unrecognized


What caused this for me was running npm install --save [package] when actually the system has previously been using yarn instead of npm.

To solve this I just deleted the node_modules folder and ran: yarn install and after that react-native run-ios (or android) works fine.

(duplcate of React Native: Command `run-ios` unrecognized)


I just ran "yarn" with no arguments and it fixed it.


the answer is easy nad it is not because of any bug at all.

make sure you are in correct directory 

if in current directory there is not any react native app ,it gives you this error