Saturday, September 18, 2021

“Port 4200 is already in use” - How to Kill Port in Windows

Angular Error - Port 4200 is already in use

Port 4200 is already in use. Use '--port' to specify a different port.
Error: Port 4200 is already in use. Use '--port' to specify a different port.
    at Server.<anonymous> (D:\Nagasai.Works\mobility-ui\node_modules\@angular-devkit\build-angular\src\angular-cli-files\utilities\check-port.js:27:28)
    at Object.onceWrapper (events.js:421:26)
    at Server.emit (events.js:314:20)
    at emitErrorNT (net.js:1343:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

This is what I used to kill the progress on port 4200

Windows users:

Port number 4200 is already in use. Open the cmd as administrator. Type below command after Opening your cmd.exe as administrator to list all active connections running under each local address  with Protocol and  Port number

netstat -a -n -o

Now find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next": Let say you found that port number 4200 is used by pid 79016. Type below command in cmd

taskkill -f /pid 79016

No comments:

Post a Comment