React native ERROR Packager can't listen on port 8081

87

When I run command react-native start, it shows Packager can't listen on port 8081.

I know the issue is about software using my port 8081 .

I use Resource Monitor to see the port, but I can't find 8081, there is no 8081

Can someone show me how to find it?

enter image description here

This question is tagged with react-native

~ Asked on 2017-04-15 11:54:58

The Best Answer is


111

You can run the packager on another port.

$ react-native start --port=8088

Alternatively, find out what is using which ports on Windows with netstat.

$ netstat -a -b -o

Netstat gives you a PID, which you can use to kill the process.

$ taskkill /pid 1234

~ Answered on 2017-04-15 15:44:01


149

On a mac, run the following command to find id of the process which is using port 8081
sudo lsof -i :8081
Then run the following to terminate process:
kill -9 23583

Here is how it will look like enter image description here

~ Answered on 2017-12-14 19:06:56


Most Viewed Questions: