I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command \"ng serve\" and it wor
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
The most simple one line command:
sudo fuser -k 4200/tcp
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
To stop all the local port running in windows, use this simple comment alone instead searching for pid separatly using netstat,
It find all the pid and stop the local port which is currently running,
taskkill /im node.exe /f