0

I can't init my new react native app. Here is the error after doing react-native init myapp :

Unable to find React Native files. Make sure "react-native" module is installed in your project dependencies.. Run CLI with --verbose flag for more detail

I already tried to reinstall react-native cli and use community cli, but doesn't work.

//EDIT:

I had to npm react-native -g install and it works again

1
  • 1
    If you have solved the problem with the answer below, you should choose an answer. Commented Jul 14, 2019 at 12:40

2 Answers 2

0

Does npm list -g shows react-native as an installed package?

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

Comments

0

npm install -g react-native didn't do it for me, as this adds the legacy CLI.

npm uninstall -g react-native-cli to remove it, then yarn global add @react-native-community/cli to install the latest got me started.

Comments

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.