Sergey Onishchenko Sergey Onishchenko - 1 year ago 312
Node.js Question

react-native run-android is unrecognized

I've installed react-native-cli globally:

npm install -g react-native-cli

Then run:

react-native init AwesomeProject

cd AwesomeProject

I got the following structure:

-- AwesomeProject

---- node_modules

------ react-native

When I run react-native run-android I get an error:

unrecognized. Did you mean to run this inside a react-native project?

When I run react-native start I get the same.

react-native -v


react-native-cli: 0.2.0

react-native: n/a - not inside a React Native project directory

What I'm doing wrong?

Answer Source

The problem was that I terminated init command because it looked like hanged without errors (even 24 hours later). To fix this I updated nodejs and npm to newer versions. Once I have done it react-native init was executed properly and there is no more problem with react-native run-android.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download