Wanna see something cool? Check out Angular Spotify 🎧

How to kill the process currently using a given port on Windows

Sometimes when I tried running my Angular application and saw this message.

An unhandled exception occurred: Port 4200 is already in use. Use ‘—port’ to specify a different port.

How to kill the process running on given port on Windows

To simple kill the process that is running on a specific port, run this command:

npx kill-port 4200

Where 4200 is the port that needs to be stopped.

And the result is satisfying.

How to kill the process running on given port on Windows

You must have [email protected]^ version to run npx, which means as the minimum of npm running on your machine must be 5.2.0 or greater.

You can also read more about kill-port here: https://www.npmjs.com/package/kill-port

Published 12 Sep 2020

Read more

 — Use VSCode Like a PRO
 — Angular Jira Clone Part 04 - Build an editable textbox
 — Angular Jira Clone Part 03 - Setup Akita state management
 — Angular Jira Clone Part 02 - Build the application layout with flex and TailwindCSS
 — Top-level await

Follow @trungvose on Twitter for more!