Closed IanPhilips closed 4 years ago
could you check if you have create-react-native-web-app or react-native-cli installed globally ?
create-react-native-web-app -v
react-native -v
hmm I don't have react-native install globally, I always run them with npx. here's the output: ~ npx create-react-native-web-app -V npx: installed 13 in 1.926s 0.15.1 ~ % npx react-native -v 4.6.3
that's odd.. I ran npx react-native-cli -v
and got this:
npx: installed 78 in 8.212s
react-native-cli: 2.0.1
react-native: 0.55.4
not sure what version 4.6.3 of react native means.. currently on 0.61 or 0.62
I am also getting the same error message when trying to run on Android. I do not have either create-react-native-web-app or react-native-cli installed globally
npx react-native-cli -v
npx: installed 78 in 5.722s
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
@IanPhilips @JessicaYeh
Thank you for raising up the issue.
I have just release a patch version 0.15.3
please try again and if it fails run:
npx create-react-native-web-app --version
then output should be: 0.15.3
Many thanks
Thank you for the quick fix! I tried it again on the latest version and npm run android
is working now. 🎉
Describe the bug I can run react native android apps in other projects. With a clean run of your instructions, I can't get the android project to run. I follow the installation instructions, cd into my project and try npm run android, which produces the following message:
To Reproduce
OS Mac OS v 10.15.3
Expected behavior The android app should run out of the box
Additional context If I clone the repo, cd into template,
npm install
andnpm run android
this will at least install on the phone though there are some other seemingly unrelated errors.npm run web
does work fine.I tried opening the android folder in android studio from the stack overflow q but this didn't help.
my .zshrc has the android sdk correctly setup: export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/platform-tools