简体   繁体   English

Google Sheets API快速入门(v4)问题

[英]Issue with google sheets API quickstart (v4)

I'm trying to go through the following tutorial: https://developers.google.com/sheets/api/quickstart/nodejs# 我正在尝试阅读以下教程: https : //developers.google.com/sheets/api/quickstart/nodejs#

And when I get to the step to run the quick start file node quickstart.js I get the following error message: Olivers-MacBook-Pro:incrementum oliverpike$ node quickstart.js 当我进入运行快速启动文件节点quickstart.js的步骤时,收到以下错误消息:Olivers-MacBook-Pro:incrementum oliverpike $节点quickstart.js

undefined:1

SyntaxError: Unexpected end of JSON input
    at Object.parse (native)
    at /Volumes/github-image/bitcoin-core/quickstart.js:43:39
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)

quickstart.js is trying to read from ~/.credentials/sheets.googleapis.com-nodejs-quickstart.json but that file is empty which is resulting in the unexpected end of JSON input error. quickstart.js尝试从〜/ .credentials / sheets.googleapis.com-nodejs-quickstart.json读取,但是该文件为空,这导致JSON输入错误意外结束。

How do I determine what needs to go in that file? 如何确定该文件中需要包含哪些内容?

删除文件,代码将触发else条件进行身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM