How to avoid ‘Port 4200 is already in use’ error with Angular-CLI

Step 1: Find the connection’s PID

> netstat -ano | findstr :yourPortNumber
Then locate the PID (something like 10764)

Step 2: Kill the process using it’s PID

> tskill yourPID
Example:
tskill 10764

Step 3: Restart your server

You should be able to run it (using ng serve)

Step 4: Stop your server properly

Don’t forget now to close properly your server by using Ctrl + C and typing Y:

Comments

Popular posts from this blog

How to use DbFunctions.TruncateTime

Provision AWS EC2 Instance and RDS with Terraform, and Deploy Spring Boot App to EC2 Instance via GitHub Action Pipeline

Microsoft Access Connectivity from C#