TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of 0 seconds

前端 未结 11 1975
天命终不由人
天命终不由人 2020-12-09 15:25

I\'m getting this error after upgrading to angular 9. I\'m using visual studio 2019, ASP .NET core with angular. Even if I create new project and update angular to 9 version

11条回答
  •  轮回少年
    2020-12-09 16:08

    If you are doing backend work only, in your startup.cs comment out

    spa.UseAngularCliServer(npmScript: "start");
    

    and add

    spa.UseProxyToSpaDevelopmentServer("http://localhost:4200");
    

    Like so...

    //spa.UseAngularCliServer(npmScript: "start");
    spa.UseProxyToSpaDevelopmentServer("http://localhost:4200");//Todo Switch back for SPA Dev
    

    Run the SPA from cmd (in ClientApp Directory) via npm start.

    Then when your run or debug your full app from Visual Studio, it will spin up so much faster.

提交回复
热议问题