You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
// Creates a publisher client
const client = new v1.PublisherClient({
// optional auth parameters
});
When I migrate to typescript, I got this error:
src/pubsubclient.ts:7:23 - error TS2339: Property 'PublisherClient' does not exist on type 'typeof import("/Users/hangao/Zume/ingest/node_modules/@google-cloud/pubsub/build/src/index")'.
7 const pubsub = new v1.PublisherClient(credential);
~~~~~~~~~~~~~~~
I am following the sample code here. https://github.com/googleapis/nodejs-pubsub/blob/master/samples/topics.js
const {v1} = require('@google-cloud/pubsub');
// Creates a publisher client
const client = new v1.PublisherClient({
// optional auth parameters
});
When I migrate to typescript, I got this error:
src/pubsubclient.ts:7:23 - error TS2339: Property 'PublisherClient' does not exist on type 'typeof import("/Users/hangao/Zume/ingest/node_modules/@google-cloud/pubsub/build/src/index")'.
7 const pubsub = new v1.PublisherClient(credential);
~~~~~~~~~~~~~~~
Environment details
@google-cloud/pubsubversion: "@google-cloud/pubsub": "^0.28.1",