Architect commands with multiple targets cannot specify overrides
Asked Answered
S

2

16

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)
Savagery answered 5/5, 2018 at 13:21 Comment(0)
S
26

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
Savagery answered 5/5, 2018 at 13:23 Comment(0)
T
0

if you have multiple apps than you can mention its name in the command as below.

yarn test web --code-coverage

here web is app in angular project.

Trefler answered 5/3, 2019 at 6:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.