“端口 4200 已在使用中".杀死与 4200 相关的所有进程不起作用. [英] "Port 4200 is already in use". Killing all the processes associated with 4200 did not work.
问题描述
我正在尝试在我的 Mac OS X 10.11.3 El Capitan 上运行 angular.
I'm trying to get angular running on my Mac OS X 10.11.3 El Capitan.
我安装了 nodeJS 和 npm.我通过 npm 安装了 angular-cli.
I installed nodeJS and npm. Through npm I installed angular-cli.
我通过命令 sudo ng new first-app
我导航到 app 文件夹并运行 sudo ng serve
.
I navigated into the app folder and ran sudo ng serve
.
它抛出了以下错误:
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)
它没有帮助.
其实我已经重新安装了nodejs、npm、angular-cli.当我在安装它之前出现一些构建错误时,因为有一些凉亭问题.不确定是什么.当我访问 localhost:4200 时,页面出现了,但上面有错误日志.现在页面甚至没有加载.加载符号只是在 favicon 附近盘旋.我不知道这是否可以成为领先者.
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 !
推荐答案
请在 git
cmd
sudo lsof -t -i tcp:4200 | xargs kill -9
这篇关于“端口 4200 已在使用中".杀死与 4200 相关的所有进程不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!