-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
api: loggingIssues related to the googleapis/nodejs-logging-winston API.Issues related to the googleapis/nodejs-logging-winston API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
I am trying to add @google-cloud/logging-winston to my VueJS project. I followed these https://www.npmjs.com/package/@google-cloud/logging-winston and https://cloud.google.com/logging/docs/samples/logging-winston-quickstart very closely.
I am getting:
TypeError: (intermediate value) (intermediate value) (intermediate value).GoogleAuth is not a constructor
at new Logging(index.js ? 221c: 137: 1)
at new LoggingCommon(common.js ? bc26 : 94: 1)
at new LoggingWinston(index.js ? 1856 : 113: 1)
Here's my code:
const winston = require('winston');
const {LoggingWinston} = require('@google-cloud/logging-winston');
// error here
const gcloudWinston = new LoggingWinston();
I traced the flow of code from new LoggingWinston() --> new LoggingCommon() --> new Logging() and found this line from the @google-cloud/logging library:
this.auth = new (gaxInstance !== null && gaxInstance !== void 0 ? gaxInstance : gax).GoogleAuth(options_);
Question: How do I get new LoggingWinston() to work for my project?
PS: My dependencies are up-to-date:
"dependencies": {
"@google-cloud/logging-winston": "^5.3.0",
"google-gax": "^3.5.8",
"googleapis": "^113.0.0",
"node": "^18.15.0",
"node-polyfill-webpack-plugin": "^2.0.1",
"vue": "^2.7.14",
...
},
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/nodejs-logging-winston API.Issues related to the googleapis/nodejs-logging-winston API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
