小编Him*_*tia的帖子

使用谷歌oauth2获取电子表格时出现错误"google.sheets不是函数"

var sheets = google.sheets('v4'); ^ TypeError: google.sheets is not a function

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

google-api google-sheets node.js google-sheets-api

6
推荐指数
1
解决办法
1387
查看次数

更改后 ts-node-dev 不会重新启动

这是我的文件:

包.json :

"scripts": {
  "generate-interfaces": "ts-node src/cli/generate-interfaces.ts",
  "dist": "npm run generate-interfaces && rm -rf dist && tsc && cp -r static/ dist/ && cp -r resource/ dist/",
  "prestart": "npm run generate-interfaces",
  "start": "ts-node-dev --respawn --transpileOnly --no-notify ./src/index.ts",
  "start:inspect": "ts-node-dev --no-deps --inspect -- ./src/index.ts",
  "pretest": "npm run generate-interfaces",
  "test": "jest"
 }
Run Code Online (Sandbox Code Playgroud)

配置文件

{
"compilerOptions": {
"declaration": true,
"target": "es2017",
"module": "commonjs",
"esModuleInterop": true,
"outDir": "dist",
"sourceMap": true,
"skipLibCheck": true,
"typeRoots": ["node_modules/@types", "./typings", "node_modules/**/*.d.ts"],
"lib": ["esnext"]
},
"include": ["src/**/*.ts", "./typings/**/*.d.ts"],
"exclude": …
Run Code Online (Sandbox Code Playgroud)

node.js typescript tsc nodemon ts-node

5
推荐指数
2
解决办法
4900
查看次数