【发布时间】:2017-09-18 14:08:56
【问题描述】:
我正在尝试使用 karma 进行测试,但出现错误:
ERROR in ./src/test.ts
Module build failed: Error: AotPlugin was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
当我执行 cmd 我得到这个结果:
+-- @angular/cli@1.1.1
| `-- @ngtools/webpack@1.4.1
`-- @ngtools/webpack@1.5.1
在我的package.json 我只有@ngtools/webpack": "^1.5.1
这个 1.4.1 来自哪里?
【问题讨论】:
-
答案就在您的眼前。这是 angular cli 的子依赖项。
标签: angular webpack angular-cli