@google-cloud/pubsub version: 0.27.0 / 0.27.1@google-cloud/pubsub into a TypeScript project"skipLibCheck": true (or explicitly set it to false in your tsconfig.jsonResulting errors (I've trimmed some very long paths that rush+pnpm generates):
<long-rush-path-1>/@google-cloud/pubsub/build/proto/iam.d.ts(2,23): error TS2307: Cannot find module 'long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/iam.d.ts(3452,40): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/iam.d.ts(3455,40): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/iam.d.ts(3483,46): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/iam.d.ts(3486,46): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(2,23): error TS2307: Cannot find module 'long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7060,40): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7063,40): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7091,46): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7094,46): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7687,31): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7703,37): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7957,31): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/proto/pubsub.d.ts(7973,37): error TS2304: Cannot find name 'Long'.
<long-rush-path-1>/@google-cloud/pubsub/build/src/message-queues.d.ts(19,24): error TS7016: Could not find a declaration file for module 'p-defer'. '<long-rush-path-4>/p-defer/index.js' implicitly has an 'any' type.
Try `npm install @types/p-defer` if it exists or add a new declaration (.d.ts) file containing `declare module 'p-defer';`
<long-rush-path-2>/google-gax/build/src/streaming.d.ts(32,28): error TS7016: Could not find a declaration file for module 'duplexify'. '<long-rush-path-5>/duplexify/index.js' implicitly has an 'any' type.
Try `npm install @types/duplexify` if it exists or add a new declaration (.d.ts) file containing `declare module 'duplexify';`
<long-rush-path-3>/grpc/index.d.ts(2,55): error TS7016: Could not find a declaration file for module 'protobufjs'. '<long-rush-path-6>/protobufjs/dist/protobuf.js' implicitly has an 'any' type.
Try `npm install @types/protobufjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'protobufjs';`
TypeScript: 17 semantic errors
@callmehiphop was this covered in #536?
@JustinBeckwith I think so, but it would probably be best if @mgabeler-lee-6rs could let us know after we cut our next release.
@mgabeler-lee-6rs I just published a new release (0.28), would you mind upgrading and testing to see if your issue still persists?
skipLibCheck is set false in tsconfig.json.I think what's left that needs fixing is:
@types/longgoogle-gax needs @types/duplexify, and this package needs to pull that updategrcp needs an updated protobufjs, and this package needs to pull that update../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/iam.d.ts:2:23 - error TS2307: Cannot find module 'long'.
2 import * as long from "long";
~~~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/iam.d.ts:3452:40 - error TS2304: Cannot find name 'Long'.
3452 positiveIntValue?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/iam.d.ts:3455:40 - error TS2304: Cannot find name 'Long'.
3455 negativeIntValue?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/iam.d.ts:3483:46 - error TS2304: Cannot find name 'Long'.
3483 public positiveIntValue: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/iam.d.ts:3486:46 - error TS2304: Cannot find name 'Long'.
3486 public negativeIntValue: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:2:23 - error TS2307: Cannot find module 'long'.
2 import * as long from "long";
~~~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7060:40 - error TS2304: Cannot find name 'Long'.
7060 positiveIntValue?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7063:40 - error TS2304: Cannot find name 'Long'.
7063 negativeIntValue?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7091:46 - error TS2304: Cannot find name 'Long'.
7091 public positiveIntValue: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7094:46 - error TS2304: Cannot find name 'Long'.
7094 public negativeIntValue: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7687:31 - error TS2304: Cannot find name 'Long'.
7687 seconds?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7703:37 - error TS2304: Cannot find name 'Long'.
7703 public seconds: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7957:31 - error TS2304: Cannot find name 'Long'.
7957 seconds?: (number|Long|null);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/@google-cloud/pubsub/0.28.0/node_modules/@google-cloud/pubsub/build/proto/pubsub.d.ts:7973:37 - error TS2304: Cannot find name 'Long'.
7973 public seconds: (number|Long);
~~~~
../../common/temp/node_modules/.registry.npmjs.org/google-gax/0.25.4/node_modules/google-gax/build/src/streaming.d.ts:32:28 - error TS7016: Could not find a declaration file for module 'duplexify'. '/home/mgl/src/event-ingestion/common/temp/node_modules/.registry.npmjs.org/duplexify/3.7.1/node_modules/duplexify/index.js' implicitly has an 'any' type.
Try `npm install @types/duplexify` if it exists or add a new declaration (.d.ts) file containing `declare module 'duplexify';`
32 import * as Duplexify from 'duplexify';
~~~~~~~~~~~
../../common/temp/node_modules/.registry.npmjs.org/grpc/1.19.0/node_modules/grpc/index.d.ts:2:55 - error TS7016: Could not find a declaration file for module 'protobufjs'. '/home/mgl/src/event-ingestion/common/temp/node_modules/.registry.npmjs.org/protobufjs/5.0.3/node_modules/protobufjs/dist/protobuf.js' implicitly has an 'any' type.
Try `npm install @types/protobufjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'protobufjs';`
2 import { Message, Service as ProtobufService } from "protobufjs";
~~~~~~~~~~~~
Found 16 errors.
@mgabeler-lee-6rs thanks for the speedy reply!
@JustinBeckwith what is the latest news for https://github.com/googleapis/nodejs-datastore/pull/358? I assume whatever the resolution is there, we'll want the same thing here.
I'm not going to have time to engage there for the next few days. @callmehiphop can you try adding skipLibCheck and types: ['node'] to the existing system test, and seeing where it goes? Worst case, we add code to the generated d.ts for now while we wait for the fix to land in pbts.
@JustinBeckwith those options already exist in the system test, but neither my local machine or CI can replicate the error. I'm just going to bite the bullet and manually edit the generated files until we get a proper fix in pbts.
NB: I realized I got the title of this issue confused / backwards, though the description was correct
@mgabeler-lee-6rs oh whoops, looks like we had it configured wrong in that case! Thanks for the update!
@mgabeler-lee-6rs just published a patch release. I think this might be the one 馃
Been kind of quiet here, so I'm going to close this one out. If the issue re-surfaces, please let us know!
Been a bit kooky on my end, but I just tried updating one of our projects to 0.28.1 and setting skipLibCheck: false again, and the errors related to PubSub are indeed gone, thank you :grinning:
@mgabeler-lee-6rs awesome, thanks for letting us know!
/me looks to see what we did to fix it
I believe it was #541
Most helpful comment
Been a bit kooky on my end, but I just tried updating one of our projects to
0.28.1and settingskipLibCheck: falseagain, and the errors related to PubSub are indeed gone, thank you :grinning: