Tag: npm start

npm start fails ( Error: listen EADDRINUSE :::3000 )

I deployed my MEAN project on ubuntu. Very often I got the message showing that the port 3000 was in use.

I use the following command to find the pid occupying the port 3000.

sudo netstat -peanut | grep 3000 | awk ‘{ print $9 }’ | sed ‘s:/[^/]*$::’ | grep -Eo ‘[0-9]{1,5}’

In my case, the pid returned is 4532

Then I terminate the process using the command kill.

kill 4532

Finally, npm start succeeds.