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

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

Aperta
#86 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
370
Fork
144
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.