Skip to content

Internal server error: The injectable 'PlatformNavigation' needs to be compiled using the JIT compiler with 19.0.0-next.8  #28523

@e-oz

Description

@e-oz

Which @angular/* package(s) are the source of the bug?

compiler

Is this a regression?

Yes

Description

Works fine with 19.0.0-next.7.
When I update to 19.0.0-next.8 (parts that are available), I see this error:

 [vite] Internal server error: 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.
      at getCompilerFacade (/Users/oz/repos/packages/core/src/compiler/compiler_facade.ts:45:11)
      at Module.ɵɵngDeclareFactory (/Users/oz/repos/packages/core/src/render3/jit/partial.ts:107:20)
      at Function.<static_initializer> (/Users/oz/repos/packages/common/src/navigation/platform_navigation.ts:29:41)
      at <anonymous> (/Users/oz/repos/packages/common/src/dom_adapter.ts:25:4)
      at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
      at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:483:26)
      at async /Users/oz/repos/repo-folder/app-name/node_modules/@angular/build/src/tools/vite/middlewares/ssr-middleware.js:20:86 (x2)

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Angular 19.0.0-next.7 + 19.0.0-next.8
TS 5.6.2

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

Notice that /Users/oz/repos/packages/core is an incorrect path.
Repo is located at /Users/oz/repos/repo-folder/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions