ionic-team / ionic-team/ionic-unit-testing-example
Uncaught Error: Module build failed: TypeError: Cannot read property 'afterCompile' of undefined
- Vorherrschende Sprache
- TypeScript
- Sterne
- 370
- Forks
- 144
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Inspect the blog entry covering testing setup and its dependency-install instructions. Confirm that it describes the webpack 3 and ts-loader compatibility issue, then update the entry to recommend a 3.x.x version of ts-loader; the work is done when the documented setup avoids the reported afterCompile error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, webpack
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100