. Advertisement .
..3..
. Advertisement .
..4..
We’re receiving the Uncaught (in promise): Error: Angular JIT compilation failed: ‘@angular/compiler’ not loaded! in angular 9 while utilizing angular. So, here are some solutions that may fix it if you’re facing the same problem. Let’s begin!
How Does Uncaught (in promise): Error: Angular JIT compilation failed: ‘@angular/compiler’ not loaded! in angular 9 Occur?
The error occurs when operating on the Angular app, showing on several routes.
ERROR Error: Uncaught (in promise): Error: Angular JIT compilation failed: '@angular/compiler' not loaded!
How Can We Fix It?
You should update all the node modules dependencies as the issue may come from the incompatibility of some versions. Use npm update within the project console.
The Solutions
Solution 1
You should stop and relaunch it if you add another material package to app.module.ts. Else you will see this problem.
imports: [ Mat Dialog,
Modify it like below
imports: [ Mat Dialog Module,
Solution 2
The problem may arise due to conflict between some versions, so you should update all your node modules’ dependencies.
Solution 3
Add aot=true in angular.json, then add “postinstall”: “ngcc –properties es2015 browser module main –first-only –create-ivy-entry-points” in package.json. Next, remove node modules and the package-lock folder, then reinstall.
Solution 4
Reduce your angular CLI version everywhere because this problem was not present in versions eight and seven.
npm uninstall -g @angular/cli
Conclusion
The solutions for Uncaught (in promise): Error: Angular JIT compilation failed: ‘@angular/compiler’ not loaded! in angular 9 must have helped you solve your problem. Please ask us about any issues occurring while performing your project. Thank you!
Leave a comment