一、问题

在用angular的时候,出现了如下问题:

【Angular】Port 4200 is already in use. Use '--port' to specify a different port.修改端口号

二、原因

同时启动了多个angular项目。

因为4200的端口号已经被占用,换一个端口号就可以了。

三、方法

修改端口号

方法1.修改配置文件

【Angular】Port 4200 is already in use. Use '--port' to specify a different port.修改端口号

方法二、命令行修改端口号

ng serve --port 4201

上面我就把端口号由4200改为了4201,当然你可以改为其他的。

相关文章:

  • 2022-01-12
  • 2021-09-28
  • 2021-11-15
  • 2021-10-28
  • 2021-10-12
  • 2022-01-06
  • 2022-03-02
  • 2021-08-31
猜你喜欢
  • 2021-04-22
  • 2021-06-24
  • 2021-05-26
  • 2022-12-23
  • 2022-02-02
  • 2021-12-11
相关资源
相似解决方案