“Port 4200 is already in use” when running the ng serve command

后端 未结 30 1465
深忆病人
深忆病人 2020-12-02 03:47

I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.

I was able to run the command \"ng serve\" and it wor

30条回答
  •  隐瞒了意图╮
    2020-12-02 04:09

    If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.

提交回复
热议问题