Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'Http2ServerResponse' is not generic #28965

Closed
1 task done
davidlj95 opened this issue Nov 25, 2024 · 1 comment · Fixed by #28971
Closed
1 task done

Type 'Http2ServerResponse' is not generic #28965

davidlj95 opened this issue Nov 25, 2024 · 1 comment · Fixed by #28971
Assignees
Labels
area: @angular/ssr freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix

Comments

@davidlj95
Copy link
Contributor

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

@alan-agius4 alan-agius4 self-assigned this Nov 26, 2024
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression area: @angular/ssr labels Nov 26, 2024
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 26, 2024
Updated the `Http2ServerResponse` interface to eliminate dependency on generics, ensuring compatibility across multiple versions of `@types/node`.

Closes angular#28965
alan-agius4 added a commit that referenced this issue Nov 26, 2024
Updated the `Http2ServerResponse` interface to eliminate dependency on generics, ensuring compatibility across multiple versions of `@types/node`.

Closes #28965

(cherry picked from commit 3dd3b22)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/ssr freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants