gpt4 book ai didi

node.js - 将 google oauth2 用于电子表格时出现错误 "google.sheets is not a function"

转载 作者:搜寻专家 更新时间:2023-10-31 22:27:34 26 4
gpt4 key购买 nike

var sheets = google.sheets('v4');
^
类型错误:google.sheets 不是函数

我正在使用这个启动教程 Node.js Quickstart for Google spreadsheets .还有其他人也面临这个问题吗?

最佳答案

问题已解决。此问题是由于 Google 的 API 版本 v4 引起的:

需要像var { google } = require("googleapis")这样使用

谢谢@Tanaike

关于node.js - 将 google oauth2 用于电子表格时出现错误 "google.sheets is not a function",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48842434/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com