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
19.0
Description
With 19.0 it was possible to use UrlMatcher
functions within SSR applications. 19.1 introduced a commit 6edb908 which was meant to fix a incompatibality of UrlMatcher
with SSR applications. I wasn't able to find any documentation that indicated UrlMatcher
and SSR are not working together. Was this a issue that needed to be solved? The only issue i was able to find on the web was in combination with the @angular-architects/module-federation library (https://dev.to/michaeljota/how-to-add-module-federation-into-your-angular-micro-frontend-apps-jmh)
Before we start refactoring our project (which requires SSR and also UrlMatcher
) or downgrading to 19.0 I would like to know what the implications were for this "fix". Happy for any insights.
Minimal Reproduction
- create project with ssr enabled with 19.1+
- add UrlMatcher function to route
- open project with
ng serve
Exception or Error
Error: Error(s) occurred while extracting routes:
- The route 'en/example' uses a route matcher which is not supported.
- The route 'en/example' uses a route matcher which is not supported.
- The route 'en/example-2' uses a route matcher which is not supported.
- The route 'en/example-2' uses a route matcher which is not supported.
- The route 'example' uses a route matcher which is not supported.
- The route 'example' uses a route matcher which is not supported.
- The route 'example-2' uses a route matcher which is not supported.
- The route 'example-2' uses a route matcher which is not supported.
at eval (/../angular/.angular/cache/19.1.1/main/vite/deps_ssr/chunk-FOZQYQAA.js:10655:15)
at _ZoneDelegate.invoke (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:369:28)
at ZoneImpl.run (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:111:43)
at eval (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:1221:40)
at _ZoneDelegate.invokeTask (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:402:33)
at ZoneImpl.runTask (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:159:47)
at drainMicroTaskQueue (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:581:35)
at invokeTask (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:487:21)
at Timeout.ZoneTask.invoke (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:472:48)
at Timeout.data.args.<computed> (/../angular/.angular/vite-root/main/node_modules/zone.js/fesm2015/zone-node.js:2260:32)
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 19.1.1
Node: 20.18.1
Package Manager: npm 10.8.2
OS: darwin arm64
Angular: 19.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, ssr
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1901.1
@angular-devkit/build-angular 19.1.1
@angular-devkit/core 19.1.1 (cli-only)
@angular-devkit/schematics 19.1.1
@angular/cdk 19.1.0
@schematics/angular 19.1.1
ng-packagr 19.0.1
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response