【问题标题】:Using async/await on googleapi libraries return undefined在 googleapi 库上使用 async/await 返回 undefined
【发布时间】:2018-08-21 21:34:31
【问题描述】:

请帮忙,这里是代码:

OAuth2Client.setCredentials(tokens)
const oauth2 = google.oauth2({ version: "v2", auth: OAuth2Client })
const userinfo = await oauth2.userinfo.v2.me.get({})
console.log(userinfo)

userinfoconsole 日志中未定义。

我正在使用googleapis@32.0.0nodejs@8.0.0

这是不小心发生的,昨天运行良好...

这是一个错误还是我做错了什么?

【问题讨论】:

    标签: google-api async-await google-api-nodejs-client


    【解决方案1】:

    一夜后问题解决了,我醒了,它工作了......

    【讨论】:

      猜你喜欢
      • 2019-04-22
      • 2020-10-02
      • 2019-06-27
      • 2019-05-30
      • 1970-01-01
      • 2022-10-04
      • 2022-08-18
      • 1970-01-01
      • 2020-09-21
      相关资源
      最近更新 更多