Repository navigation
Labels
area: @angular/ssrfreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
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
18.2.11
Description
The error in the title and below appears when trying to build an app using Angular v19
Seems that Http2ServerResponse type wasn't generic up until recently
I have @types/[email protected] installed. Can't trace when it was introduced as couldn't find a CHANGELOG for @types/node
Minimal Reproduction
- Create an Angular v19 fresh app. With SSR.
- Remove
skipLibCheck(that wasn't the default until recently) - Install
@types/[email protected]as dependency - Run
ng build
Exception or Error
✘ [ERROR] TS2315: Type 'Http2ServerResponse' is not generic. [plugin angular-compiler]
node_modules/.pnpm/@[email protected]_3tltse6rekaa6pakct6mm2hr6a/node_modules/@angular/ssr/node/index.d.ts:190:100:
190 │ ...rResponse | Http2ServerResponse<Http2ServerRequest>): Promise<...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 19.0.1
Node: 22.11.0
Package Manager: pnpm 9.11.0
OS: darwin arm64
Angular: 19.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1900.1
@angular-devkit/build-angular 19.0.1
@angular-devkit/core 19.0.1
@angular-devkit/schematics 19.0.1
@angular/cli 19.0.1
@angular/ssr 19.0.1
@schematics/angular 19.0.1
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
Upgrading to a recent version of @types/node where generic type is there fixes the issue
Reacted by KarlXOL
Metadata
Metadata
Assignees
Labels
area: @angular/ssrfreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
Activity
fix(@angular/ssr): ensure compatibility for `Http2ServerResponse` type
fix(@angular/ssr): ensure compatibility for `Http2ServerResponse` type
fix(@angular/ssr): ensure compatibility for `Http2ServerResponse` type
angular-automatic-lock-bot commentedon Dec 27, 2024
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.