I am trying to open an app via Android Studio. I have previously used Expo as my React Native development environment, but this app uses the React Native CLI. I have followed all of the instructions for the CLI setup here: https://reactnative.dev/docs/environment-setup
However, when I finally try to run "npx react-native run-android", something strange happens. The terminal starts chewing metadata and stuff as if it received my command, but then after a while it finishes with the text:
error Unrecognized command "run-android".
info Run "react-native --help" to see a list of all available commands.
A few observations:
- Running "react-native --help" also returns an error, because it "is not recognized as the name of a cmdlet, function, script file, or operable program."
- After the chewing of metadata but before the error, there are many lines of codes with warnings, which all look like this (regarding a variety of libraries):
warn Package @react-native-community/eslint-config has been ignored because it contains invalid configuration. Reason: Cannot find module '@react-native-community\eslint-config\package.json'
- The developer said I did not need to install any particular libraries or modules - perhaps he was wrong? Still doesn't solve the issue though.
- I have tried writing the same commands in different terminals, but the result is the same.
- I have tried using the terminal debugger in Visual Studio code as suggested in the thread below, but that did not make me any wiser. Getting error - Unrecognized command "run-android", when running react native,