Error while running angular in Cypress: ‘@angular/compiler’ is not available

During Cypress E2E testing, angular is not running within. Getting following angular error (we did migrate recently to version 18),

The following error originated from your test code, not from Cypress.

The injectable ‘PlatformNavigation’ 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.

When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

Cypress could not associate this error to any specific test.

We dynamically generated a new test to display this failure.

node_modules/@angular/core/fesm2022/core.mjs:3489:1

message += Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',n;
message += or manually provide the compiler with 'import >"@angular/compiler";' before bootstrapping.;
throw new Error(message);
^
}
else {
throw new Error(‘JIT compiler unavailable’);

at getCompilerFacade (webpack://recorder/./node_modules/@angular/core/fesm2022/core.mjs:3489)
at Module.ɵɵngDeclareFactory (webpack://recorder/./node_modules/@angular/core/fesm2022/core.mjs:37979)
at <static_initializer> (webpack://recorder/./node_modules/@angular/common/fesm2022/common.mjs:33:46)
at ./node_modules/@angular/common/fesm2022/common.mjs (webpack://recorder/./node_modules/@angular/common/fesm2022/common.mjs:25)
at webpack_require (webpack://recorder/webpack/bootstrap:19)
at ./node_modules/@angular/common/fesm2022/http.mjs (http://localhost:52444/__cypress/tests?p=cypresse2eloginlogin.cy.js:7530:73)
at webpack_require (webpack://recorder/webpack/bootstrap:19)
at ./node_modules/keycloak-angular/fesm2022/keycloak-angular.mjs (http://localhost:52444/__cypress/tests?p=cypresse2eloginlogin.cy.js:52812:78)
at webpack_require (webpack://recorder/webpack/bootstrap:19)
at eval (webpack://recorder/./cypress/e2e/login/login.cy.js:2)
From previous event:
at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (http://localhost:52444/__cypress/runner/cypress_runner.js:3486:19)
at Promise._then (http://localhost:52444/__cypress/runner/cypress_runner.js:1239:17)
at Promise.then (http://localhost:52444/__cypress/runner/cypress_runner.js:1132:17)
at runScriptsFromUrls (http://localhost:52444/__cypress/runner/cypress_runner.js:111747:136)
at Object.runScripts (http://localhost:52444/__cypress/runner/cypress_runner.js:111788:12)
at $Cypress.onSpecWindow (http://localhost:52444/__cypress/runner/cypress_runner.js:41303:67)“`

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật