Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
itslenny opened this issue Mar 20, 2018 · 3 comments

Comments

@itslenny
Copy link

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 [email protected]
@wilfredonoyola
Copy link

@itslenny please you sure the add the package.json correct. Read more here

@itslenny
Copy link
Author

@wilfredonoyola I'm aware of what the issue is, and I've already fixed it on my end.

I'm saying that in the instructions on the blog post it should be npm install [email protected] instead of just npm install ts-loader if you expect new people to be able to follow the instructions and have them work.

@leifwells
Copy link
Contributor

@itslenny Sorry the blog post isn't completely up-to-date. I'll update it over the weekend.

Things change quickly these days and keeping blog posts updated can be difficult.

When I have updated the blog post, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants