无法读取未定义的属性“client_secret" [英] cannot read property 'client_secret' of undefined

查看:16
本文介绍了无法读取未定义的属性“client_secret"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照 https://developers.google.com/google-apps/activity/v1/quickstart/nodejs

我在尝试运行时抛出一个错误,提示 cannot read property 'client_secret' of undefined.

I throws an error saying cannot read property 'client_secret' of undefined when trying to run it.

寻找您的宝贵建议.

提前致谢.

推荐答案

var clientSecret = credentials.installed.client_secret;在这一行中,凭据指向 client_secret.json,因此必须安装"第一个密钥.在我的情况下,关键是网络",这导致了错误.我刚刚将键web"重命名为installed".

var clientSecret = credentials.installed.client_secret; In this line credentials is pointing to client_secret.json so the first key has to be "installed". In my case the key was "web" and that was causing the error. I just renamed the key "web" to "installed".

这篇关于无法读取未定义的属性“client_secret"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆