angular / universal

Server-side rendering and Prerendering for Angular
MIT License
4.04k stars 484 forks source link

JIT compilation failed for injectable class c{historyGo(e){throw new Error("Not implemented")}} (after upgrade to Angular 13) #2654

Closed iamvipinpatil closed 2 years ago

iamvipinpatil commented 2 years ago

app.77c6562c5028f9aff17c.bundle.js:2 Uncaught Error: The injectable 'c' 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. at kr (app.77c6562c5028f9aff17c.bundle.js:2:771398) at Module.y_ (app.77c6562c5028f9aff17c.bundle.js:2:963160) at Module.53533 (app.77c6562c5028f9aff17c.bundle.js:2:647692) at o (app.77c6562c5028f9aff17c.bundle.js:2:1373597) at Object.39443 (app.77c6562c5028f9aff17c.bundle.js:2:1223799) at o (app.77c6562c5028f9aff17c.bundle.js:2:1373597) at app.77c6562c5028f9aff17c.bundle.js:2:1375900 at app.77c6562c5028f9aff17c.bundle.js:2:1665933 at app.77c6562c5028f9aff17c.bundle.js:2:1665937

Package.json

"@angular/animations": "^13.3.1", "@angular/cdk": "13.3.2", "@angular/common": "~13.3.1", "@angular/compiler": "~13.3.1", "@angular/core": "~13.3.1", "@angular/forms": "~13.3.1", "@angular/http": "~7.2.9", "@angular/material": "13.3.2", "@angular/platform-browser": "^13.3.1", "@angular/platform-browser-dynamic": "~13.3.1", "@angular/router": "~13.3.1", "@detachhead/ts-helpers": "^7.0.0", "@kolkov/angular-editor": "2.0.0", "@ng-idle/core": "^11.1.0", "@ng-idle/keepalive": "^11.0.3", "@ng-select/ng-select": "^8.1.1", "@ngtools/webpack": "^13.3.1", "@types/arcgis-js-api": "^4.10.0", "@types/jquery": "3.5.14", "@typescript-eslint/eslint-plugin": "^4.14.1", "@typescript-eslint/eslint-plugin-tslint": "^4.14.1", "@typescript-eslint/parser": "^4.14.1", "@yberion/ngx-treeview": "^13.0.1", "angular-svg-icon": "13.0.0", "angular2-modal": "^3.0.3", "atlas-theme": "^2.3.11", "bootstrap": "4.6.0", "core-js": "^2.6.5", "eslint": "^7.18.0", "esri-loader": "^2.16.0", "esri-service": "^1.2.0", "font-awesome": "^4.7.0", "hammerjs": "^2.0.8", "ie-shim": "0.1.0", "moment": "^2.29.2", "ng-animations": "^2.0.0", "ng-multiselect-dropdown": "^0.2.14", "ng-pick-datetime": "^7.0.0", "ng2-bootstrap-modal": "^1.0.1", "ng2-file-upload": "2.0.0-3", "ng2-select": "^2.0.0", "ngx-gallery": "^5.9.1", "ngx-mask": "13.1.13", "ngx-material-timepicker": "5.5.3", "ngx-moment": "^6.0.2", "ngx-pagination": "^5.1.1", "ngx-swiper-wrapper": "10.0.0", "ngx-webstorage": "9.0.0", "node-sass": "^7.0.1", "popper.js": "^1.14.7", "rxjs": "7.4.0", "rxjs-compat": "^6.4.0", "ts-helpers": "^1.1.2", "ts-loader": "^9.2.8", "zone.js": "~0.11.5"

alan-agius4 commented 2 years ago

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

This might be related to your directory structure so its really important to get an accurate repro to diagnose this.

angular-automatic-lock-bot[bot] commented 2 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.