While following the getting started guide for running a React Native application, I encountered an issue due to an overlooked step that I believe should be made more explicit. The guide mentions starting the Metro Bundler in a separate terminal, but this crucial step can easily be missed, especially for newcomers who may not be familiar with the conventional workflow.
Current Documentation Excerpt
## Step 2: Start your Application
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
### For Android
```bash
# using Yarn
yarn android
Issue
As a new user, I missed the comment about letting Metro Bundler run in its own terminal and directly ran yarn android. This resulted in the following error:
Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
Suggested Update
To prevent this confusion, I suggest making the instructions more explicit by clearly separating the steps for starting the Metro Bundler and running the application.
Proposed Documentation Update
Step 2: Start your Application
Start the Metro Bundler
First, you need to start the Metro Bundler. This should be done in its own terminal window. Open a terminal from the root of your React Native project and run the following command:
# using Yarn
yarn start
Run Your Application
Once the Metro Bundler is running, you can start your application in a new terminal window. Open a new terminal from the root of your React Native project and run the appropriate command for your platform:
For Android
# using Yarn
yarn android
By making these steps more explicit, we can help new users avoid common issues and improve their initial setup experience. Thank you for considering this suggestion!
While following the getting started guide for running a React Native application, I encountered an issue due to an overlooked step that I believe should be made more explicit. The guide mentions starting the Metro Bundler in a separate terminal, but this crucial step can easily be missed, especially for newcomers who may not be familiar with the conventional workflow.
Current Documentation Excerpt
Issue
As a new user, I missed the comment about letting Metro Bundler run in its own terminal and directly ran
yarn android
. This resulted in the following error:Suggested Update
To prevent this confusion, I suggest making the instructions more explicit by clearly separating the steps for starting the Metro Bundler and running the application.
Proposed Documentation Update
Step 2: Start your Application
Start the Metro Bundler
First, you need to start the Metro Bundler. This should be done in its own terminal window. Open a terminal from the root of your React Native project and run the following command:
Run Your Application
Once the Metro Bundler is running, you can start your application in a new terminal window. Open a new terminal from the root of your React Native project and run the appropriate command for your platform:
For Android
By making these steps more explicit, we can help new users avoid common issues and improve their initial setup experience. Thank you for considering this suggestion!