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

Typescript error TS2305 while building a project with latest version (0.30.1) #676

Closed
xyclos opened this issue Jun 26, 2019 · 5 comments
Closed
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. needs more info This issue needs more information from the customer to proceed. 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

@xyclos
Copy link

xyclos commented Jun 26, 2019

Environment details

  • OS: macos 10.14.5
  • Node.js version: 8.16.0
  • npm version: 6.4.1
  • @google-cloud/pubsub version: 0.30.1

Steps to reproduce

  1. Create a typescript project which depends on google-cloud/pubsub: ^0.30.1
  2. install deps and build with tsc

Output from tsc

node_modules/@google-cloud/pubsub/build/src/index.d.ts(75,10): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'ServiceError'.
node_modules/@google-cloud/pubsub/build/src/message-queues.d.ts(18,20): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'ServiceError'.
node_modules/@google-cloud/pubsub/build/src/message-stream.d.ts(17,20): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'ServiceError'.
node_modules/@google-cloud/pubsub/build/src/message-stream.d.ts(17,42): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'StatusObject'.
node_modules/@google-cloud/pubsub/build/src/pubsub.d.ts(19,10): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'ServiceError'.
node_modules/@google-cloud/pubsub/build/src/pubsub.d.ts(19,24): error TS2305: Module '"../../../../@grpc/grpc-js/build/src"' has no exported member 'ChannelCredentials'.

Workaround

  • I rolled back to 0.29.1 and was able to build with tsc successfully.

I'm willing to contribute if someone might be able to point me into the correct direction to fix this.

Thanks!

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 27, 2019
@bcoe bcoe 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. and removed triage me I really want to be triaged. labels Jun 28, 2019
@callmehiphop
Copy link
Contributor

@xyclos could you share your TypeScript version and tsconfig.json contents with us? I'm not able to reproduce this locally.

@callmehiphop callmehiphop added the needs more info This issue needs more information from the customer to proceed. label Jul 1, 2019
@xyclos
Copy link
Author

xyclos commented Jul 2, 2019

{
  "compilerOptions": {
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "outDir": "./dist/",
    "noImplicitAny": true,
    "moduleResolution": "node",
    "module": "commonjs",
    "esModuleInterop": true,
    "target": "es6",
    "sourceMap": true,
    "baseUrl": ".",
    "paths": {
      "*": ["node_modules/*", "src/types/*"]
    }
  },
  "include": ["src/**/*"],
  "exclude": ["src/**/__tests__/**/*"]
}

typescript : ^3.5.2

@laljikanjareeya
Copy link
Contributor

@xyclos not able to reproduce with given configuration and version, could you try to delete node_modules and package-lock.json file and run npm install.

@callmehiphop
Copy link
Contributor

@xyclos is this still an issue for you?

@callmehiphop
Copy link
Contributor

There hasn't been much activity here in a little while, so I'm going to close this out. If anyone continues to experience this please let us know and we'll be happy to re-open and investigate!

@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
feywind pushed a commit to feywind/nodejs-pubsub that referenced this issue Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. needs more info This issue needs more information from the customer to proceed. 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

5 participants