react-native: "run-android" stuck on JS Metro Bundler ("warn")
Today I created a new project with “react-native init projectName” and when I tried to “run-android” it runs Node JS server and stucks like first screenshot.
If I kill the JS server it gives the warn about packager server and contiunes to install app and gives Unable to load script error (for sure because JS server not running)
When I first type “react-native start” and “run-android” it works fine, but I want to know why it happens like that? I search that warn error and can’t find anything.
It’s start happening suddenly. I didn’t recieve that error on my old projects (same react and react native versions) and don’t know why it happens.
Any help?
Error:
warn Failed to automatically start the packager server. Please run "react-native start" manually. Error details: Command failed: cmd.exe /C C:\Users\ezran\Desktop\SADELABS\demoProject\node_modules\react-native\scripts\launchPackager.bat
nullnull
package.json
"react": "16.8.6", "react-native": "0.60.4"
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 2.63 GB / 7.88 GB
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5692245
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 31 (9 by maintainers)
i have got the solution of the problem
Published fix in v2.8.3 of the CLI. Please update the
@react-native-community/cli
to the latest version.Yeah you were right, older project has “@react-native-community/cli@2.8.0”, newer one " @react-native-community/cli@2.8.1".
Sorry for not thinking problem on CLI, my bad. I don’t know very well CLI
Same problem, I tried to reinstall node, clear npm cache, etc …