Skip to content

TypeError: ɵgetOrCreateAngularServerApp is not a function in 19.1.x after fix angular-compiler error #29458

Closed
@Ruisi-Lu

Description

@Ruisi-Lu

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Throw error message when hot reload in 19.1.x, this issue still exists in v19.1.4.

Image

Image

#29379 (comment)

Minimal Reproduction

  1. Edit the project to throw angular-compiler error.
    eg.
    X [ERROR] NG5002: Unexpected character "}" [plugin angular-compiler]
    or
    X [ERROR] TS1128: Declaration or statement expected. [plugin angular-compiler]
  2. Fix the code.
  3. Observe the error in the terminal and the browser.

Exception or Error

TypeError: ɵgetOrCreateAngularServerApp is not a function
    at _AngularAppEngine.getAngularServerAppForRequest (C:\Project\rosy-cart\.angular\cache\19.1.4\rosy-cart\vite\deps_ssr\chunk-VBOT64B7.js:11367:23)
    at async _AngularAppEngine.handle (C:\Project\rosy-cart\.angular\cache\19.1.4\rosy-cart\vite\deps_ssr\chunk-VBOT64B7.js:11306:23)

Your Environment

Angular CLI: 19.1.4
Node: 20.18.1
Package Manager: pnpm 10.0.0
OS: win32 x64

Angular: 19.1.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.4
@angular-devkit/build-angular   19.1.4
@angular-devkit/core            19.1.4
@angular-devkit/schematics      19.1.4
@angular/cli                    19.1.4
@angular/ssr                    19.1.4
@schematics/angular             19.1.4
rxjs                            7.8.1
typescript                      5.5.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions