2

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? Commented Jul 6, 2017 at 2:12
  • I tried reinstalling react-native-cli but I'm not success. Commented Jul 6, 2017 at 7:06

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Install react-native without -cli

npm install -g react-native

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

1 Comment

Please provide an explanation of your answer so that the next user knows why this solution worked for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.