Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Architect commands with multiple targets cannot specify overrides

I'm converting a library (ng-app-state) to use the angular cli, now that v6 supports libraries (yay!).

When trying to run certain CLI commands it fails with an error like this:

$ ng test --source-map ng-app-state
Architect commands with multiple targets cannot specify overrides.'test' would be run on the following projects: ng-app-state-monorepo,ng-app-state
Error: Architect commands with multiple targets cannot specify overrides.'test' would be run on the following projects: ng-app-state-monorepo,ng-app-state
    at TestCommand.validate (S:\Programming\git repositories\ng-app-state-monorepo\node_modules\@angular\cli\models\architect-command.js:91:23)
like image 228
Eric Simonton Avatar asked May 05 '18 13:05

Eric Simonton


1 Answers

You need to put the library name first, and the options afterward. E.g.

# do this
$ ng test ng-app-state --watch=true --source-map

# don't do this
$ ng test --watch=true --source-map ng-app-state
like image 159
Eric Simonton Avatar answered Sep 21 '22 12:09

Eric Simonton