Uncaught (in promise): Error: Angular JIT compilation failed: ‘@angular/compiler’ not loaded! in angular 10

Had the same issue,and solved it by adding "aot" in my angular.json options object

"serve" : { 
   "options": { "aot": true }
}

Seems like with ng serve is used JIT instead AOT. Hope this helps

Source: Angular Questions