-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Closed
Copy link
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimestate: has PR
Milestone
Description
Command
build
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
Disclaimer: I'm not sure if this is an angular problem or NgNeat problem.
When injecting BreakpointObserver somewhere within NgNeat provideEffects, SSG breaks with the error below.
Two solutions I've found so far:
- Don't inject
BreakpointObserverinside NgNeat <- Nothing I can do about shortterm - Create a custom ErrorHandler which injects
ActivatedRoute<- The reason why I raise the issue here and why I think it's related to Angular itself
Minimal Reproduction
npm cinpm run build
-> Problem occures
Fix 1:- uncomment
activatedRoute = inject(ActivatedRoute)incustom-error-handler.ts npm run build
-> Problem disappears
Fix 2:- Remove
TestBreakpointServicefromprovideEffectsinapp.config.ts npm run build
-> Problem disappears
Exception or Error
ng build
ERROR E [Error]: NG0200
at Ut.get (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:6549)
at Ut.retrieve (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:5645)
at gy (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:2309)
at D (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:2411)
at Object.ɵfac [as factory] (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:31:61269)
at Ut.hydrate (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:7183)
at Ut.get (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:6422)
at Ut.retrieve (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:5645)
at gy (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:2309)
at D (file:///home/davidw/Dokumente/test-repositories/ssr-problem/.angular/prerender-root/13cb54dd-0d66-4e1c-a3ae-061c2d347a59/chunk-BNOMVFD5.mjs:5:2411) {
code: -200
}
Initial chunk files | Names | Raw size | Estimated transfer size
chunk-7VHCAC4T.js | - | 238.19 kB | 65.24 kB
polyfills-5CFQRCPP.js | polyfills | 34.59 kB | 11.33 kB
main-2KR7AVQG.js | main | 3.19 kB | 1.33 kB
styles-5INURTSO.css | styles | 0 bytes | 0 bytes
| Initial total | 275.96 kB | 77.91 kB
Lazy chunk files | Names | Raw size | Estimated transfer size
chunk-QXT554YX.js | subroute-module | 947 bytes | 947 bytes
Prerendered 0 static routes.
Application bundle generation failed. [3.038 seconds] - 2025-11-25T10:15:20.534Z
✘ [ERROR] An error occurred while extracting routes.
NG0210
Your Environment
Angular CLI: 20.3.7
Node: 22.21.1
Package Manager: npm 10.9.4
OS: linux x64
Angular: 20.3.7
... build, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-server, router, ssr
Package Version
------------------------------------
@angular-devkit/architect 0.2003.7
@angular-devkit/core 20.3.7
@angular-devkit/schematics 20.3.7
@angular/cdk 20.2.14
@schematics/angular 20.3.7
rxjs 7.8.2
typescript 5.9.3
zone.js 0.15.1
Anything else relevant?
Problem also happening with all angular packages updated to v21.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimestate: has PR