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

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.


For me this and the followings are solved the issue: https://github.com/angular/angular-cli/issues/10666

And also you need to edit your package.json file and remove the --extractCss parameter from the start and build property. from:

"scripts": {
    "ng": "ng",
    "start": "ng serve --extract-css",
    "build": "ng build --extract-css",

to:

"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",

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.