I'm trying to get angular running on my Mac OS X 10.11.3 El Capitan.
I installed nodeJS and npm. Through npm I installed angular-cli.
I created a new app via the command sudo ng new first-app
I navigated into the app folder and ran sudo ng serve
.
It threw the following error :
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Port 4200 is already in use.
With reference from another answer, I tried the following :
sudo kill $(sudo lsof -t -i:4200)
It did not help.
Actually, I have re-installed nodejs, npm, angular-cli. When I had installed it before there was some build error as there was some bower issue. Not sure what. When I accessed localhost:4200 that time, the page showed up but with the error log on it. Now the page doesn't even load. The loading symbol just keeps circling near the favicon. I don't know if this could be a lead.
Thanks. I need to get angular running pronto. Lots to learn !
This help me. Kill the process on port 4200 on mac terminal
npx kill-port 4200
Then use
ng serve
Reference - Find (and kill) process locking port 3000 on Mac
Please fire this one on git
cmd
sudo lsof -t -i tcp:4200 | xargs kill -9
Sometimes you need to kill process forcefully, use -9
for that
kill -9 $(lsof -t -i:4200)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With