Why does npm start gives me an error about the port?

Probably port is already in use. I face similar issue when i first run react-native run-android and then npm start. I solve it like this: First, get the id of the process running in port 8081:

sudo lsof -i :8081

then kill it:

kill -9 ID_SHOWN_FROM_PREVIOUS_CMD 

ID_SHOWN_FROM_PREVIOUS_CMD will be something like 25534 So after it, first run npm start and then react-native run-android


Find the port:

netstat -a -n -o | find "8081"

You need to find the pid. Second step, kill that:

taskkill /PID 5952 /F

In this case the pid is "5952".