一、现象

当本地同时运行了多个angular项目时,端口占用问题

Port 4200 is already in use. Use '--port' to specify a different port.

二、解决

1、相应找到以下目录 node_modules/@angular/cli/lib/config/ 中的 schema.json

2、搜索到到默认的“4200”(大概509行)

 

3、把4200 改为其它的没有被占用的端口,如6200 

 

三、总结

一般这种端口是在自身客户端中设置的,优先从相应的地方进行查询会更快捷。

posted on 2017-09-12 18:58  小老虎网络  阅读(1356)  评论(0编辑  收藏  举报