Error: listen EADDRINUSE

The npm web server is a very simple web server used in development and testing for delivering static files.

While attempting to use start the npm web server you may see an error like this:

    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1156:14)
    at listen (net.js:1182:10)
    at net.js:1280:9
    at dns.js:85:18
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

One fast way to resolve the issue is:

killall node

Or, you may try the following solution to the listen EADDRINUSE error:

ps | grep node

Take note of the Process ID. Then, to free up that port, stop the process using the following.

kill <process id>

I hope this helps. Please leave a comment below.

2 thoughts on “Error: listen EADDRINUSE

Leave a Reply

Your email address will not be published. Required fields are marked *