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

Property 'end' in type 'ResourceStream<T>' is not assignable to the same property in base type 'Transform'. #308

Closed
stefandoorn opened this issue Feb 2, 2022 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@stefandoorn
Copy link

stefandoorn commented Feb 2, 2022

Environment details

  • OS: node:14 docker (just pulled the latest version, digest b2c75df8c9706156c38b4f1f678d00e11cb2bfda09fc4ab6e36ec17ac9163865)
  • Node.js version: v14.19.0
  • npm version: 6.14.16
  • @google-cloud/paginator version: 3.0.6

Steps to reproduce

Dependencies in this project:

    "@google-cloud/bigquery": "^5.10.0",
    "@google-cloud/storage": "^5.18.1",

Dev dependencies:

    "@types/node": "^14.18.10",
    "ts-node": "^10.4.0",
    "typescript": "^4.5.5"

Script:

    "build": "tsc",

Trying to build, I'm running into the following error:

$ docker run -it --rm --name node14 -v "$PWD":/usr/src/app -w /usr/src/app node:14 npm run-script build

> project@0.1.0 build /usr/src/app
> tsc

node_modules/@google-cloud/paginator/build/src/resource-stream.d.ts:37:5 - error TS2416: Property 'end' in type 'ResourceStream<T>' is not assignable to the same property in base type 'Transform'.
  Type '(...args: any[]) => void' is not assignable to type '{ (cb?: () => void): this; (chunk: any, cb?: () => void): this; (chunk: any, encoding?: BufferEncoding, cb?: () => void): this; }'.
    Type 'void' is not assignable to type 'this'.
      'this' could be instantiated with an arbitrary type which could be unrelated to 'void'.

37     end(...args: any[]): void;

I've tried pulling around with also node:16 and even node:12, which seems to give the same issues. I've identified one dependencies upgrade commit since when it started to go wrong, will try to output it here. It used to work fine before this upgrade. I've only listed the relevant changes:

Package Old version New version
@google-cloud/bigquery 5.9.3 5.10.0
@google-cloud/common 3.8.1 3.9.0
@google-cloud/storage 5.16.1 5.18.0
typescript 4.5.4 4.5.5
@types/node 14.18.0 14.18.9
@stefandoorn stefandoorn added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 2, 2022
@stefandoorn
Copy link
Author

Only now I see a similar issue in the bigquery repo: googleapis/nodejs-bigquery#1075

@stefandoorn
Copy link
Author

Solved it by upgrading to node:16 + @types/node@16 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant