This happens when I try to create a topic
TypeError: this.auth.getUniverseDomain is not a function
at GrpcClient.createStub (/Users/<...>/node_modules/google-gax/src/grpc.ts:418:48)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Sample Code:
pubSubClient = new PubSub({
"projectId": "project_name"
});
initTopic = async () => {
// Creates a new topic if it does not exist
const [topics] = await this.pubSubClient.getTopics()
RootLogger.info("topic names: " + topics.join(","))
const topicExists = topics.some(topic => topic.name.endsWith(this.topicName));
if (topicExists) {
RootLogger.info(`Topic ${this.topicName} already exists.`);
} else {
await this.pubSubClient.createTopic(this.topicName);
RootLogger.info(`Topic ${this.topicName} created.`);
}
}