Closed CroMarmot closed 2 years ago
Might be fixed with my PR #1230 in combination with specifying your terminal (react-native run-android --terminal gnome-terminal
)
Sorry, my operating system and related environment have been upgraded, and I haven't used RN for a long time. Now there is no environment to reproduce this problem, so I will close this issue first.
Environment
Description
yarn android
can't start js server,it print
Starting JS server...
but start failed,ps -aux | grep node
print nothingand on my android, the app looks like this url
Reproducible Demo
More info
if I run
yarn start
first , then runyarn android
it works well on my android, andps -aux | grep node
printSome debug info
I found the source code of
Starting JS server...
, https://github.com/react-native-community/cli/blob/f76add94dcfb647dd55b59a5fad9a4d5363962fa/packages/platform-android/src/commands/runAndroid/index.ts#L104I add
console.log(passedOptions)
below to print thepassedOptions
https://github.com/react-native-community/cli/blob/f76add94dcfb647dd55b59a5fad9a4d5363962fa/packages/cli/src/index.ts#L136-L137
it shows
and
console.log(error)
belowhttps://github.com/react-native-community/cli/blob/f76add94dcfb647dd55b59a5fad9a4d5363962fa/packages/platform-android/src/commands/runAndroid/index.ts#L326-L336
it show