Error: listen EADDRINUSE: address already in use :::[Port]

Follow the steps to resolve this issue.

Step 1: Find the application that using the port. e.g. 4000

lsof -i :4000

The output can be:

node  3665 hdvlap   26u  IPv6 0xf7021a2315350bd5 

Step 2: Close the process that holds this port. Here is 3665.

sudo kill -9 3665

Last updated