2
votes

I inited React native project by:

react-native init MyShop In MyShop folder, I install "react-native-drawer":

npm install --save react-native-drawer After install, I run project by:

react-native run-android And get error "Command run-android unrecognized. Make sure that you have run npm install and that you are inside a react-native project." I checked react-native by command line

react-native -v And get info:

react-native-cli: 2.0.1 react-native: n/a - not inside a React Native project directory It seems react-native lib has been removed after installed react-native-drawer. My npm version:

E:\2.Projects\My\MyShop>npm -v 5.0.4 My node version:

E:\2.Projects\My\MyShop>node -v v8.1.2 Please help me re-procedure and fix it. Thank you!

2
Have you tried reinstalling react native's cli?Andrew Li
I tried reinstalling react-native-cli but I'm not success.allready4v

2 Answers

1
votes

I found out solution for this issue! I update npm to latest version: 5.1.0. Uninstall react-native-cli:

npm uninstall -g react-native-cli

Next, reinstall react-native-cli:

npm install -g react-native-cli

My issue has been fixed.

0
votes

Install react-native without -cli

npm install -g react-native

It will fix the issue......Hopefully....coz