-
Notifications
You must be signed in to change notification settings - Fork 24k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot start react-native run-ios or run-android after initializing #31284
Comments
+1 I find this issue incredibly annoying, only issue on iOS. |
I ran into same issue when upgraded from 63.3 to 64.0
How fixed:
So issue is probably due to Node version |
https://reactnative.dev/blog/2021/03/12/version-0.64#major-dependency-version-changes - "Minimum Node support bumped from 10 to Node 12", tks @yerevin |
I had to issues:
After those two steps I was good to go and things worked correctly for me. |
I have the same issue on android studio. The app runs successfully from terminal though |
I am also getting the same error.
SyntaxError: Unexpected token { |
It's because of node version. But just logging out of the computer and switching node version to latest with nvm, doesn't work. |
For me, it appears on ios and android, when I try to run on real devices after upgrade to 0.64. |
We are using GitHub issues exclusively to track bugs in the core React Native library. Please try asking over on Stack Overflow as it is better suited for this type of question. |
@javierjim answer helped me. It was the issue with node only. Thanks man!! |
Cannot copy and paste had to retype.
~/node_modules/@react-native-community/cli/build/commands/doctor/healthchecks/index.js:48
} catch {}
^
SyntaxError: unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisConetxt (vm.js:139:10)
at Module._compile (module.js:617:28)
..
Description
The error above occurs after initializing a blank project.
Metro pops up in another terminal tab with the error above.
React Native version:
System:
OS: macOS 10.15.7
cpu: (16) x64 Intel(R) Core(TM) i8-988H CPU @ 2.30GHz
memory: 13.79 GB / 32.00 GB
shell: 5.7.1 - /bin/zsh
Binaries:
Node: 15.13.0 - ~/.nvm/..
Yarn: Not found
npm: 7.7.6 ~./nvm/...
watchman: not found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDK:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
android SDK:
API Levels: 23, 27, 29, 30
Build Tools: 23.0.1, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 27.0.3, 28.0.3, 29.0.0, 30.0.3
System images: android-23 | Google APIs Intel x86 Intel x86 Atom, anroid-27
npmPackages:
@react-native-community/cli: not found
react: 17.0.1 > 17.0.1
react-native: 0.64.0 =>0.64.0
react-native-macos: not found
npmGlobalPackages
react-native: not found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
Expecting the emulators to pop up with welcome screen
The text was updated successfully, but these errors were encountered: