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
I have added Angular SSR in an existing Angular app with routing enabled and when I run ng build
I get the following error:
The 'products/:id' route uses prerendering and includes parameters, but 'getPrerenderParams' is missing. Please define 'getPrerenderParams' function for this route in your server routing configuration or specify a different 'renderMode'.
Minimal Reproduction
- Create a new Angular CLI 19 application
- Create a route in the
app.routes.ts
file with parameter - Run
ng add @angular/ssr
- Run
ng build
Exception or Error
Your Environment
Angular CLI: 19.0.0
Node: 22.11.0
Package Manager: npm 10.9.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1900.0 (cli-only)
@angular-devkit/core 19.0.0 (cli-only)
@angular-devkit/schematics 19.0.0 (cli-only)
@schematics/angular 19.0.0 (cli-only)
Anything else relevant?
Please note that I answered No to the following question when installing SSR, which is the default value:
Would you like to use the Server Routing and App Engine APIs (Developer Preview) for this server application?