Skip to content

Type 'Http2ServerResponse' is not generic #28965

Closed

Description

@davidlj95

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

  1. Create an Angular v19 fresh app. With SSR.
  2. Remove skipLibCheck (that wasn't the default until recently)
  3. Install @types/[email protected] as dependency
  4. 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

Activity

  1. self-assigned this
    on Nov 26, 2024
  2. added
    freq1: low
    on Nov 26, 2024
  3. added a commit that references this issue on Nov 26, 2024
    1aa2a08
  4. added a commit that references this issue on Nov 26, 2024
    277b8a3
  5. added a commit that references this issue on Nov 26, 2024
    3dd3b22
  6. angular-automatic-lock-bot commented on Dec 27, 2024

    @angular-automatic-lock-bot

    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.

  7. locked and limited conversation to collaborators on Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: @angular/ssrfreq1: lowseverity5: regressiontype: bug/fix

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions