Something is already running on port 3000 React

I am getting this error when running command 'npm start' in React. But I have stopped my application first and then starting again. Why is it showing this error, Is there any way I can get rid of that.

2 Answers

Reason can be that your port - 3000 is not released. You can free the ports using commands in mac. Firstly, find the PID of port that needs to be released. If you want to find PID of port: 3000 the command will be

lsof -i :3000

This will list down the processes related to port 3000. From PID column copy PID and run below command

kill -9 PID

Open your terminal and follow steps.

1. Type command - lsof -i :3000 and you will see below list inside terminal.

2. Copy PID as shown in the above image and run command - 

kill -9 9877

Replace 9877 with actual PID that you have copied and the issue will be resolved

Ask question now
Never leave your website again in search of code snippets by installing our chrome extension.