angular-cli - 具有多个目标的 Architect 命令无法指定覆盖

标签 angular-cli angular-cli-v6

我正在转换库( ng-app-state )以使用 angular cli,现在是 v6 supports libraries (好极了!)。

当尝试运行某些 CLI 命令时,它会失败并显示如下错误:

$ 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)

最佳答案

您需要先输入库名称,然后才是选项。例如。

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

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

关于angular-cli - 具有多个目标的 Architect 命令无法指定覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50189932/

相关文章:

directory - WebStorm:新的 AngularCli 项目:错误:目录应匹配格式 "path"

Angular 2 : using gzip files in production

angular - new Worker() 只有在传递一个字符串时才会被捆绑

javascript - 使用更具体的模块导入有什么好处/区别?

javascript - 我可以在没有 Webpack 的情况下使用 Angular 6 吗?

Angular 6 : How to install a previous version of Angular project

angular-cli-v6 - --dev 选项在 Angular CLI 中不起作用

javascript - 将 Angular cli 与现有项目一起使用

angular - 如何配置以在 Angular cli 中包含 Compass

javascript - Angular errorHandler vs window.onError 全局错误处理