I ran into a situation where I had multiple localhost ports. This is my fault as I failed to clearly close them.
So what do we do? A very simple way is to run the following command:
npx kill-port <port>
replace port with the port you want to close without the bracket.
Note that if you don't have the kill-port package installed, you would be prompted to install it.
There you go. Make sure you close your servers with Ctrl + C, unless stated otherwise.
Top comments (0)