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 摘要。