error while running npx React-Native run-android command

Asked

Viewed 22 times

-3

When I execute npx react-native run-android, which is to start the Android emulator, returns me the following error:

Command run-android unrecognized. Make sure that you have run npm install and that you are Inside a React-Native project.

The problem started when I installed the following library npm install --save react-native-collapsible.

How to resolve this error?

  • How are the scripts of package.json?

1 answer

-2

The error message says that you are probably not running this command from within the root of your active React file. Just in case, do the following procedure:

  • Delete the node_modules folder and the package-lock.json / Yarn.lock file
  • Reopens the project folder
  • Reinstall the libs using npm install or yarn install if you have Yarn installed.
  • Rotate again npx react-native run-android

Browser other questions tagged

You are not signed in. Login or sign up in order to post.