-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Update build-run instructions in docs #4148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @agrawal-d ! Comments below.
docs/howto/build-run.md
Outdated
Start the Metro bundler server using `react-native start`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the steps of the upstream instructions:
https://reactnative.dev/docs/environment-setup
just before react-native run-android
(or actually npx react-native run-android
, in their version.) There are a lot of steps there, and I don't want to try to duplicate them.
It looks like that instruction is new in v0.62 -- it's not in the v0.61 docs:
https://reactnative.dev/docs/0.61/getting-started.html
So in short I think the audience that needs to be specifically told about this step is people who've already gone through these instructions before the v0.62 release. Like you 🙂 and potentially other existing contributors, but not new readers of these instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted the commit.
docs/howto/build-run.md
Outdated
### `react-native run-{android/ios}` launches the app, then crashes immediately | ||
|
||
Starting from React Native 0.60, you need to launch the Metro bundler server | ||
separately, using `react-native start`. Once the server starts up, run | ||
`react-native run-android` again, and the app should not crash. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A troubleshooting entry would definitely be helpful!
One key element in troubleshooting entries is generally a copy of the error message. That's helpful because it means people can Ctrl+F search for the message they're seeing, and quickly find the entry relevant to them. So let's include a copy of that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with the error message.
Regarding the app crash that can happen when `react-native run-android` is executed without starting the Metro bundler server.
We have these broadly in the order you might run into them: first in setting up the environment, then in building, then in running.
Edits include: * The error message doesn't appear on the terminal, but rather in a GUI in the app, and as a wrapped paragraph in sans-serif rather than as monospace. (Also the wrapping here differs from the actual message.) So use a plain quotation block rather than a code block. * Fix the quoted error message slightly to match what's actually shown. * Put a key phrase from the message in the heading. * Write out the commands names in full, to help them be found by search.
Thanks @agrawal-d ! Merged, with a few tweaks as additional commits. |
Required after the RN 0.60 upgrade.