openmobilehub / react-native-omh-maps

https://openmobilehub.github.io/react-native-omh-maps/
Apache License 2.0
22 stars 0 forks source link

Suggestion: Be Explicit About Running Metro Bundler in Getting Started Guide #85

Closed dzuluaga closed 2 months ago

dzuluaga commented 3 months ago

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!