'Uncaught Error: The injectable 'PlatformLocation' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available
My Angular application is served via Node 16.14.2. After trying to upgrade my angularjs application to Angular 13, I'm receiving the following error:
bundle.js:6666 JIT compilation failed for injectable class PlatformLocation {
historyGo(relativePosition) {
throw new Error('Not implemented');
}
}
getCompilerFacade @ bundle.js:6666
bundle.js:6685 Uncaught Error: The injectable 'PlatformLocation' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.
The injectable 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.
Taken help from official guide https://angular.io/guide/upgrade. The project will compile, but won't work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|