The NPM script 'start' exited without indicating that the Angular CLI was listening for requests

前端 未结 8 1885
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 06:36

I\'m attempting to start an .NET Core 2/Angular 6 SPA. I created an Angular 5 Application using "dotnet new angular" then proceeded to upgrade using this guide fro

相关标签:
8条回答
  • 2020-12-03 07:09

    Try to do the following

    1. Open a Powershell
    2. Navigate to the clientapp directory
    3. Run npm audit fix

    This works for ReactJS & VueJS projects too.

    0 讨论(0)
  • 2020-12-03 07:11

    The problem bugs me for a couple days too. Now finally get a way around. Apparently, Visual Studio tries to launch Angular CLI server for us automatically along with the ASP.Net core process. For this instance, it failed.

    So according to Microsoft Doc here, we can start Angular CLI server manually.

    1. navigate to the 'ClientApp' folder, and issue:

      ng serve

      to start server from the console.

    2. In 'Startup.cs' file, replace

      spa.UseAngularCliServer(..)

    with

    spa.UseProxyToSpaDevelopmentServer("http://localhost:4200");
    
    1. F5 to start ASP.Net Core project as we normally do.

    This way you can continue debugging the application.

    0 讨论(0)
提交回复
热议问题