Bug with Angular-Cli 6 : "Unknown option: '--extractCss'" #65

Closed
opened 2025-08-09 17:14:52 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @atp-tha on 5/15/2018

I create a project from fresh angular-cli template and upgrade it to Angular 6 following instructions from https://update.angular.io/. and run the project using Visual Studio.

An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss'

))
System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification)

InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss'

Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware+d__3.MoveNext()

AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss'
))

But ng serve worked as expected.

The --extractCss option is unknown because it was removed and now use angular.json instead according to https://github.com/angular/angular-cli/issues/10666.

From log above I believe C# code call angular-cli with --extractCss and listened for correct respond but it ended up error because angular-cli do not support --extractCss anymore.

*Originally created by @atp-tha on 5/15/2018* I create a project from fresh angular-cli template and upgrade it to Angular 6 following instructions from https://update.angular.io/. and run the project using Visual Studio. > An unhandled exception occurred while processing the request. > AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss' > > )) > System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification) > > InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss' > > Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware+<StartAngularCliServerAsync>d__3.MoveNext() > > AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Unknown option: '--extractCss' > )) But `ng serve` worked as expected. The `--extractCss` option is unknown because it was removed and now use `angular.json` instead according to https://github.com/angular/angular-cli/issues/10666. From log above I believe C# code call angular-cli with `--extractCss` and listened for correct respond but it ended up error because angular-cli do not support `--extractCss` anymore.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#65
No description provided.