0

I am upgrading my angular app from 6 to 13. I was able to solve the dependencies and do ng build successfully. When I ran the appplication, I am getting the below error.

main.js:1 Uncaught Error: JIT compiler unavailable
    at g (main.js:1:45697)
    at bt (main.js:1:198212)
    at main.js:1:561691
    at 5130 (main.js:1:561899)
    at t (runtime.js:1:143)
    at main.js:1:2275919
    at n (runtime.js:1:1550)
    at main.js:1:65

I tried to use aot = true in angular.json file and also modify "postinstall": "ngcc --properties es5 browser module main --first-only" in package.json. I am still not able to resolve this issue. Are there any options to include JIT compiler in the angular appplication, so it runs without errors.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
user1015388
  • 1,283
  • 4
  • 25
  • 45
  • Maybe this helps: https://stackoverflow.com/questions/68798086/jit-compiler-unavailable-after-angular-update – MikeOne Sep 11 '22 at 22:13
  • None of the solutions in above link is helping, not sure whats wrong... – user1015388 Sep 11 '22 at 23:00
  • @user1015388 Did you find solution for this ? I am also stuck after angular update 12 – Andrej12345 Nov 09 '22 at 00:01
  • @Andrej12345,there were library dependency issues which caused this for me. – user1015388 Nov 10 '22 at 13:22
  • So after all dependencies were compatible with your angular version then the error was gone ? – Andrej12345 Nov 11 '22 at 11:48
  • DId you also debuged the problem to see more specific error ? When debug I am getting that the problem is some depenency which comilationMode is set to partial. Did you had such dependencies ? I am using btw angular version 12 – Andrej12345 Nov 11 '22 at 11:49
  • This dependency for example https://github.com/ng-select/ng-select/blob/master/src/ng-select/tsconfig.lib.json – Andrej12345 Nov 11 '22 at 11:50

0 Answers0