React-native-router-flux: Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

Created on 26 Jun 2017  路  6Comments  路  Source: aksonov/react-native-router-flux

Version

  • react-native-router-flux 4.0.0-alpha.4
  • react-native 2.0.1
  • npm 5.0.3
  • nodejs v8.1.2

Detail

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 .

Most helpful comment

i fixed use yarn install

All 6 comments

I was having the same problem nonetheless I found the fix.

Solution

  1. 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.

  2. Run m -rf node_modules && npm install

  3. react-native should be in your /node_modules file now

  4. 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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YouYII picture YouYII  路  3Comments

booboothefool picture booboothefool  路  3Comments

basdvries picture basdvries  路  3Comments

kirankalyan5 picture kirankalyan5  路  3Comments

GCour picture GCour  路  3Comments