Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng serve TypeError after compile error fix in ssr app #29883

Closed
1 task
imaksp opened this issue Mar 19, 2025 · 2 comments
Closed
1 task

ng serve TypeError after compile error fix in ssr app #29883

imaksp opened this issue Mar 19, 2025 · 2 comments
Labels
needs: repro steps We cannot reproduce the issue with the information given

Comments

@imaksp
Copy link

imaksp commented Mar 19, 2025

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

getting this error after fixing any compile error:

TypeError: ɵgetOrCreateAngularServerApp is not a function
    at _AngularAppEngine.eval

Minimal Reproduction

fix any compile error in Angular app having SSR/RenderMode (with application builder) & save file.
I will try to make minimal reproduction later.

Exception or Error

TypeError: ɵgetOrCreateAngularServerApp is not a function
    at _AngularAppEngine.eval (/Users/**/**/app-***/.angular/cache/19.2.3/**/vite/deps_ssr/chunk-WFYZZED4.js:11513:25)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/***/.angular/cache/19.2.3/app-***/vite/deps_ssr/chunk-SF4RXNR5.js:86:24)

Your Environment

Angular CLI: 19.2.3
Node: 22.13.1
Package Manager: yarn 4.7.0
OS: darwin arm64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.3
@angular-devkit/build-angular   19.2.3
@angular-devkit/core            19.2.3
@angular-devkit/schematics      19.2.3
@angular/cli                    19.2.3
@angular/ssr                    19.2.3
@schematics/angular             19.2.3
rxjs                            7.8.2
typescript                      5.8.2
zone.js                         0.15.0

Anything else relevant?

error only occurs in our SSR app, disabling the hmr makes no difference. & saving file 2nd time after adding space or any new content fixes the error automatically. our other CSR only app doesn't have this issue.

similar closed issue: #29458

@alan-agius4
Copy link
Collaborator

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.

@alan-agius4 alan-agius4 added the needs: repro steps We cannot reproduce the issue with the information given label Mar 19, 2025
@imaksp
Copy link
Author

imaksp commented Mar 20, 2025

Hi, this is difficult to regenerate in fresh app, but adding some more logs here:

Image

logs shown in yellow color were added by me. entryPoint value is {} so if (!entryPoint) check is not useful.
Also when I save file again after adding empty space it doesn't call getEntryPointExportsForUrl function and only logs following & it works after that:

Page reload sent to client(s).
{
  "added": [],
  "modified": [
    "/Users/**/***.component.ts"
  ],
  "removed": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: repro steps We cannot reproduce the issue with the information given
Projects
None yet
Development

No branches or pull requests

2 participants