'Trying to get ngUpgrade to work - getting JIT compilation failed for directive class static_UpgradeComponent
I have tried all the current answers for this which come up on Google. However, no luck!
I am trying to use ngUpgrade to get an angularJS app working (dual boot) with Angular 12+.
I have resolved lots of compilation errors, but stuck on this one:
core.umd.js?4dc8:4351 JIT compilation failed for directive class static_UpgradeComponent {
/**
* Create a new `UpgradeComponent` instance. You should not normally need to do this.
* Instead you should derive a new class from this one and call the sup…
getCompilerFacade @ core.umd.js?4dc8:4351
ɵɵngDeclareFactory @ core.umd.js?4dc8:33936
eval @ static.mjs?c584:1637
./app.ts @ mo-explorer-online.js?_dc=1.5.7:2395
__webpack_require__ @ mo-explorer-online.js?_dc=1.5.7:20
5 @ mo-explorer-online.js?_dc=1.5.7:4160
__webpack_require__ @ mo-explorer-online.js?_dc=1.5.7:20
(anonymous) @ mo-explorer-online.js?_dc=1.5.7:84
(anonymous) @ mo-explorer-online.js?_dc=1.5.7:87
core.umd.js?4dc8:4370 Uncaught Error: The directive 'static_UpgradeComponent' needs to be
compiled using the JIT compiler, but '@angular/compiler' is not available.
The directive is part of a library that has been partially compiled. However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.
Ideally, the library is processed using the Angular Linker to become fully AOT compiled.
Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server', or manually provide the compiler with 'import "@angular/compiler";' before bootstrapping.
Any help will be appreciated.
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
