React native ERROR Packager can't listen on port 8081

Morton picture Morton · Apr 15, 2017 · Viewed 136.3k times · Source

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

Answer

RC_02 picture RC_02 · Dec 14, 2017

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