Skip to content

v3.4.3 upgraded to @types/express:^5.0.0 although express:^4.21.2 is used #673

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

Closed
caugner opened this issue Feb 3, 2025 · 2 comments · Fixed by #674
Closed

v3.4.3 upgraded to @types/express:^5.0.0 although express:^4.21.2 is used #673

caugner opened this issue Feb 3, 2025 · 2 comments · Fixed by #674
Labels
bug Something isn't working P2

Comments

@caugner
Copy link
Contributor

caugner commented Feb 3, 2025

In 16709c6, @matthewrobertson bumped @types/express from 4.17.21 to ^5.0.0, which probably wasn't intended.

This causes issues, because the RouteParameters type in @types/express-serve-static-core, which is used by @types/express, changed slightly between v4 and v5

This caused unexpected issues for us when upgrading dependencies in https://github.com/mdn/yari/blob/main/cloud-function/package.json, as @sentry/google-cloud-serverless 8.54.0 expects express v4 types.

@caugner caugner changed the title v3.4.3 upgraded to @types/express:^5.0.0 although express:^4.21.2 is used v3.4.3 upgraded to @types/express:^5.0.0 although express:^4.21.2 is used Feb 3, 2025
@zymotik
Copy link

zymotik commented Feb 11, 2025

This is also causing issues because of incompatibilities with the Google Cloud Identity Platform Blocking Functions if used with @google-cloud/functions-framework.

In addition to what @caugner mentions above, my question is: Are types really a dependency? Should they not be moved to devDependencies?

If this helps anyone else with type issues while building their cloud functions, I've added an override to my package.json temporarily so that I can build my project without mismatched type failures:

{
  ...
  "overrides": {
    "@types/express": "^4.0.0"
  }
}

@zymotik
Copy link

zymotik commented Feb 11, 2025

You may need to use v5 here instead.

If this helps anyone else with type issues while building their cloud functions, I've added an override to my package.json temporarily so that I can build my project without mismatched type failures:

{
...
"overrides": {
"@types/express": "^4.0.0"
}
}

@chujchen chujchen added bug Something isn't working P2 labels Feb 18, 2025
@HKWinterhalter HKWinterhalter removed their assignment Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants