i create my react-native app by using react-native and run it by using react-native run-android it is work. don't have any error, but when i installed react-native-router-flux and i'm run again by using
command react-native run-android i have some alert message like this :
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
what!? what happen .?
Additional, i'm develop in Windows OS
thanks .
I was having the same problem nonetheless I found the fix.
Solution
Once you download the react-native-router-flux package, a package-lock.json file will be generated, move it out of the folder, do not delete it.
Run m -rf node_modules && npm install
react-native should be in your /node_modules file now
Run your code using run-android or run-ios and it's now fixed.
try latest version 3.41.0 or 4.0.0-beta.3
thanks guy! i fixed this problem by using old npm version to install react-native-router-flux. it is work for me
i fixed use yarn install
I reinstalled react-native. Ridiculous but it worked.
For me, the global version was in a different version of project
run react-native info and check the versions
Most helpful comment
i fixed use yarn install