DEV Community

mojavejoe
mojavejoe

Posted on

ng serve ...'@angular/compiler not loaded

I'm a little green to Ionic/Angular and am not entirely sure where the dividing line between the two is so...

Angular CLI: 9.1.2
OS: win32 x64
Angular: 9.1.13
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.803.29
@angular-devkit/build-angular 0.1000.8
@angular-devkit/build-optimizer 0.1000.8
@angular-devkit/build-webpack 0.1000.8
@angular-devkit/core 10.2.4
@angular-devkit/schematics 10.2.4
@angular/http 7.2.16
@ngtools/webpack 10.0.8
@schematics/angular 13.3.0
@schematics/update 0.901.2 (cli-only)
rxjs 6.6.7
typescript 3.8.2
webpack 4.43.0

Using "ionic serve" or "ng serve" at the command line, my app seems to compile with no errors present in the terminal window. At the completion of compiling in the terminal window, a browser (chrome) tab is opened and I can see my favicon in the tab but the browser tab is blank. F12 shows the console and this is what it says:

Error: Angular JIT compilation failed: '@angular/compiler' not loaded!

  • JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
  • Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?
  • Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrapping.

I've googled every piece of this message and gone down some trippy rabbit holes and I always come back to this. I'm sure this isn't enough info to get the help I need so I'm happy to provide whatever details I can. Thanks in advance.

Joe

Top comments (0)