1、相应找到以下目录node_modules/@angular/cli/lib/config/ 中的 schema.json
2、搜索到到默认的“4200”端口,
3、把4200 改为其它的没有被占用的端口,如6200 。
好了,angularjs2 启动的时候端口被占用的问题就轻轻松松的解决啦。
本文介绍了如何解决 Angular 项目启动时端口被占用的问题。通过修改 node_modules 目录下 schema.json 文件中的端口号,可以轻松地将默认端口从 4200 更改为其他未被占用的端口。
1、相应找到以下目录node_modules/@angular/cli/lib/config/ 中的 schema.json
2、搜索到到默认的“4200”端口,
3、把4200 改为其它的没有被占用的端口,如6200 。
好了,angularjs2 启动的时候端口被占用的问题就轻轻松松的解决啦。

被折叠的 条评论
为什么被折叠?
