Seeing this error “warn – error raised: Error: listen EADDRINUSE”? Well let’s see how we can solve it.
About the error
This error is caused by the port number already being used by another process. So we need to find that process and kill it.
The Best Solution
linux find all active processes
OR linux find process by specific port
To kill the process by id.
So for our found process it’s 29845.
Note: The -9 bit is required to ensure the process is effectively killed even if it is unresponsive (we’re telling the OS to kill the program directly and the application knows nothing about it and thus cannot be ignored).
The process has now been killed and our node server should start normally on that port we specified.