- Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
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
18
Description
I am encountering the following error in my Angular app:
TypeError: ɵgetOrCreateAngularServerApp is not a function at _AngularAppEngine.getAngularServerAppForRequest (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29464:23) at async _AngularAppEngine.handle (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29407:23)
This error occurs frequently in the larger project I am working on, but it is very difficult to reproduce in a small, isolated project. I managed to create reproduction repository. I am pretty sure, that this error didn't exist in version > 19
This is excactly the same like this issue: #29907
Minimal Reproduction
Steps to reproduce the issue:
- Clone https://github.com/Wycza/angular-bug-getOrCreateAngularServerApp
- Install dependencies
- Run the server
- Open
localhost:4200 - Change something which will produce error in template, e.g. in
index.component.htmlfile and save it - Redo change so it is the valid template again
- Sometimes, you have to repeat steps
5-6many times or even kill the app and rerun it again. - After couple of tries you should see
TypeError: ɵgetOrCreateAngularServerApp is not a function at _AngularAppEngine.getAngularServerAppForRequest (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29464:23) at async _AngularAppEngine.handle (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29407:23)- after this error the browser won't refresh by its own, I have to do it manually - in big project it occurs very often which is very annoying
I was not able to post the video here so I've added it to the repository:
Exception or Error
TypeError: ɵgetOrCreateAngularServerApp is not a function at _AngularAppEngine.getAngularServerAppForRequest (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29464:23) at async _AngularAppEngine.handle (D:\Repozytoria\angular-bug\.angular\cache\20.3.8\bug\vite\deps_ssr\chunk-D4GEBLTE.js:29407:23) Your Environment
Angular CLI: 20.3.8 Node: 24.11.0 Package Manager: npm 11.6.1 OS: win32 x64 Angular: 20.3.9 ... common, compiler, compiler-cli, core, forms ... platform-browser, platform-server, router Package Version ------------------------------------ @angular-devkit/architect 0.2003.8 @angular-devkit/core 20.3.8 @angular-devkit/schematics 20.3.8 @angular/build 20.3.8 @angular/cdk 20.2.11 @angular/cli 20.3.8 @angular/material 20.2.11 @angular/ssr 20.3.8 @angular/youtube-player 20.2.11 @schematics/angular 20.3.8 rxjs 7.8.2 typescript 5.9.3 Anything else relevant?
No response