-1

After creating a project using npm rect-native init command, when I try to run the project I got some errors

npm ERR! code E404

npm ERR! 404 Not Found - GET http://registry.npmjs.org/run-android - Not found

npm ERR! 404

npm ERR! 404  'run-android@latest' is not in the npm registry.

npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<Username>\AppData\Roaming\npm-cache\_logs\2020-09-14T05_04_23_787Z-debug.log
Install for [ 'run-android@latest' ] failed with code 1

I tried so many things like reinstalling react native or create new user but still have same problem. Please help.

NearHuscarl
  • 66,950
  • 18
  • 261
  • 230

1 Answers1

1

First, make sure you are inside project directory.

I think the command you're looking for is if react-native-cli is installed

react-native run-android

cd into your project and run this command.

OR

you can run this command without react-native-cli installation:

npx react-native run-android
Arfa Ahmed
  • 58
  • 8
Prateek Thapa
  • 4,829
  • 1
  • 9
  • 23