react-native run-android is unrecognized

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


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.

(This is a duplicate of React Native: Command `run-ios` unrecognized)