Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Property 'destroy' in type 'MessageStream' is not assignable to the same property in base type 'PassThrough' #1451

Description

@sariroti

When we try to build our nestjs application using npm run build there is error like this :

image

Environment details
OS: Linux Alpine
Node.js version: 12.18.3
npm version: 6.14.8
@google-cloud/pubsub version: 2.18.4

Steps to reproduce
Update your library to @google-cloud/pubsub": "2.18.4"
docker build -t -f
in docker file there is command RUN npm run build

Activity

  1. ypriyantoko commented on Jan 5, 2022

    @ypriyantoko

    we got the same issue :

    image

    @sariroti temporarily we fix it with using fixed old pubsub version, and remove package-lock.json from .gitignore

  2. sariroti commented on Jan 5, 2022

    @sariroti
    Author

    Hi @ypriyantoko can you tell me which old version you use ? i try to use older version like 2.17.0 no luck.

  3. sariroti commented on Jan 5, 2022

    @sariroti
    Author

    so we've fixed this by using this line in Dockerfile

    COPY ./package*.json ./

    previously is :

    COPY ./package.json ./

    without a star after package.

    found by my colleauge.

    thanks @ypriyantoko for commenting and helping

  4. pixl-scribe commented on Jan 5, 2022

    @pixl-scribe

    This is caused by MessageStream.destroy not being compatible with the latest version of @types/node. The latest version of node types has changed the signature of destroy. I was able to work around this error by downgrading my version of @types/node to 17.0.5. This still needs to be fixed in @google-cloud/pubsub.

      "devDependencies": {
        "@types/node": "17.0.5",
    
  5. added a commit that references this issue on Jan 6, 2022
  6. dweekly commented on Jan 13, 2022

    @dweekly
    Contributor

    FYI, seeing this issue also.

  7. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    and removed
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Jan 17, 2022
  8. dweekly commented on Jan 20, 2022

    @dweekly
    Contributor

    Awesome. Can we get this pushed in a release soon?

  9. added a commit that references this issue on Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the googleapis/nodejs-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions