Skip to content

[cli] Command run-android unrecognized. #2880

Closed
@xinthink

Description

@xinthink
Contributor

I'm following the quick start guide to create a RN app, but got the error message:

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

and the command react-native android is also unrecognized.

Environment:

  • node v4.0.0 (npm v2.14.2)
  • RN v0.11.0

Activity

shinriyo

shinriyo commented on Sep 20, 2015

@shinriyo

thank you react-native android command was fine

codingwithus

codingwithus commented on Sep 21, 2015

@codingwithus

same issues happens to me also

pcqpcq

pcqpcq commented on Sep 22, 2015

@pcqpcq

copy directory "node_modules" to my project fixed.
you can find "node_modules" in demo project.

so i guess we should run "react-native init" or "react-native android" first.

self-assigned this
on Sep 24, 2015
mkonicek

mkonicek commented on Sep 24, 2015

@mkonicek
Contributor

Did you change to your app's folder? Just updated the Getting Started guide to make this clearer:
https://github.com/facebook/react-native/blob/master/docs/GettingStarted.md

pcqpcq

pcqpcq commented on Sep 25, 2015

@pcqpcq

i don't think what you have updated is useful to this issue
a0ccebc#diff-c427a522f4ea08a4c045a518ac721ce9

xinthink

xinthink commented on Sep 26, 2015

@xinthink
ContributorAuthor

Thanks @pcqpcq, changing directory did fix my problem.

mbylstra

mbylstra commented on Oct 2, 2015

@mbylstra

If you are using a version of react-native-cli less than 0.12, any error will get swallowed and you'll see the error "Command run-android unrecognized", regardless of what the actual error is. In my case, I was running the command from the correct directory, but lodash had somehow gotten into a corrupt state. Doing npm uninstall lodash and npm install lodash fixed the problem for me.

The react-native-cli in v0.12.0-rc will not swallow errors: 373c877.

What I did was hack my installed version of react-native-cli (found using which react-native) so that the error is logged to the console.

deeppatidar

deeppatidar commented on Nov 20, 2015

@deeppatidar

Command run-android unrecognized. Did you mean to run this inside a react-native project?
Getting same issue i have tried all possible stuff but still doesn't working even android command also not working

9mm

9mm commented on Nov 22, 2015

@9mm

Im getting same thing... it's on an existing project that I just did a fresh npm install on. It worked before, so maybe an updated package broke it?

bmichal

bmichal commented on Feb 7, 2016

@bmichal

Had the same issue, it turned out I did not have /node_modules directory inside.
Runningnpm install solved the problem.

windmxf

windmxf commented on Feb 18, 2016

@windmxf

miss node_modules directory

27 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @montao@marcellodesales@mkonicek@doukasd@xinthink

        Issue actions

          [cli] Command `run-android` unrecognized. · Issue #2880 · facebook/react-native