ionic-team / ionic-team/ionic-unit-testing-example

Uncaught Error: Module build failed: TypeError: Cannot read property 'afterCompile' of undefined

未关闭
#86 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
370
派生
144
PR 合并指标
30 天内没有已合并 PR

描述

I followed the instructions for setting up testing on my Ionic project, but I got the error `Uncaught Error: Module build failed: TypeError: Cannot read property 'afterCompile' of undefined`

After some investigation I realized that Ionic uses webpack 3, but the default version of `ts-loader` installed with npm install is for webpack 4. Please update the blog entry to install a 3.x.x version of ts-loader.

For anyone facing this error you can simply install the correct version of ts-loader manually like this...

```
npm uninstall -D ts-loader
npm install -D ts-loader@3.x.x
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。