Skip to main content
The start command launches Metro, the JavaScript bundler for React Native. Metro compiles your JavaScript code and serves it to your running app with support for Fast Refresh.

Usage

Options

Examples

Basic Usage

Starts Metro on the default port (8081) with interactive mode enabled.

Custom Port

Useful when port 8081 is already in use.

Reset Cache

Clears Metro’s cache. Use this when:
  • You’ve made native code changes
  • Dependencies were updated
  • Experiencing unexpected bundling errors

Custom Host

Allows devices on your network to connect to Metro.

Watch Additional Folders

Useful for monorepo setups where code exists outside the project root.

HTTPS Server

Enables HTTPS with custom certificates for secure local development.

Limit Workers

Limits CPU usage by restricting the number of worker processes.

Non-Interactive Mode

Disables keyboard shortcuts and interactive features. Useful for CI/CD environments.

Interactive Mode

When Metro is running in interactive mode, you can use these keyboard shortcuts:

Metro Server Output

When Metro starts successfully, you’ll see:

Environment Variables

Custom Port

Node Environment

Common Use Cases

Development with Multiple Devices

Monorepo Setup

Performance Optimization

Reduces CPU usage on lower-end machines.

Troubleshooting

Port Already in Use

Error: Port 8081 is already in use Solution:

Cache Issues

Error: Bundling errors or stale code Solution:

Cannot Connect from Device

Error: Device shows red screen “Could not connect to Metro” Solution:

Watchman Issues

Error: File watching errors Solution:

Performance Tips

Use source maps only in development:
metro.config.js
Limit worker processes:
Enable persistent cache in metro.config.js:

Next Steps

Run iOS

Build and run your app on iOS

Run Android

Build and run your app on Android

Metro Config

Configure Metro bundler settings

Bundle

Create production bundles