Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
Description
The following error often shows up on ng serve, especially after updating dependencies (running ng serve the first time after ng update):
[vite] (ssr) Error when evaluating SSR module /main.server.mjs: There is a new version of the pre-bundle for ".angular/cache/20.3.6/brainko/vite/deps_ssr/@angular_localize_init.js?v=...", a page reload is going to ask for it.
Minimal Reproduction
Transient error. When stopping the server via Ctrl+C and re-running ng serve, the error is gone.
Exception or Error
2:09:01 PM [vite] (ssr) ✨ new dependencies optimized: @angular/common/locales/global/en 2:09:01 PM [vite] (ssr) ✨ optimized dependencies changed. reloading 2:09:01 PM [vite] (ssr) Error when evaluating SSR module /main.server.mjs: There is a new version of the pre-bundle for "/home/<my-project>/.angular/cache/20.3.6/<my-project>/vite/deps_ssr/@angular_localize_init.js?v=0dd686b6", a page reload is going to ask for it. 2:09:01 PM [vite] Internal server error: There is a new version of the pre-bundle for "/home/<my-project>/.angular/cache/20.3.6/<my-project>/vite/deps_ssr/@angular_localize_init.js?v=0dd686b6", a page reload is going to ask for it.
Your Environment
Angular CLI: 20.3.6 (latest) Node: 22.16.0 Package Manager: npm 11.5.2 OS: linux x64 Angular: 20.3.5 (latest) ... common, compiler, compiler-cli, core, forms, localize ... platform-browser, platform-browser-dynamic, platform-server ... router, service-worker Package Version ------------------------------------ @angular-devkit/architect 0.2003.6 @angular-devkit/core 20.3.6 @angular-devkit/schematics 20.3.6 @angular/build 20.3.6 @angular/cdk 20.2.9 @angular/cli 20.3.6 @angular/material 20.2.9 @angular/ssr 20.3.6 @angular/youtube-player 20.2.9 @schematics/angular 20.3.6 rxjs 7.8.2 typescript 5.9.3
Anything else relevant?
The error seems to coincide with ✨ new dependencies optimized: @angular/common/locales/global/en, and could be related to or an evolution of angular/angular#63524.