mmy
mmy

Reputation: 77

React-native error: Metro bundler can't listener on 8081?

I'm using react-native latest version and get the following error:

enter image description here

How can I resolve this error? Thanks!

Upvotes: 3

Views: 6349

Answers (2)

Sagar Bhatnagar
Sagar Bhatnagar

Reputation: 484

This is because the port is being used by another process.Simple solution for this problem.

  1. Close all the terminal instances
  2. Open iOS folder and delete build file
  3. re run the project

It will work like a charm

Upvotes: 2

Shaun Saker
Shaun Saker

Reputation: 487

Try this:

lsof -i :8081

kill -9 PID_FROM_ABOVE

react-native start

.....

Upvotes: 10

Related Questions