我是谷歌云平台的新手,我正在学习本教程
https://cloud.google.com/docs/authentication/getting-started#auth-cloud-implicit-nodejs
在设置了环境变量后,我使用了谷歌云,这一行导致了问题
const {Storage} = require('@google-cloud/storage');
当我对此行进行注释时,它会起作用,否则会引发错误。
TypeError: Expected `input` to be a `Function` or `Object`, got `undefined`
push../node_modules/gtoken/node_modules/pify/index.js.module.exports
D:/SE/Web/React/storybook/node_modules/gtoken/node_modules/pify/index.js:56
53 | var objType = typeof input;
54 |
55 | if (!(input !== null && (objType === 'object' || objType ===
'function'))) {
> 56 | throw new TypeError("Expected `input` to be a `Function` or
`Object`, got `".concat(input === null ? 'null' : objType, "`"));
| ^ 57 | }
58 |
59 | var filter = function filter(key) {
View compiled
./node_modules/gtoken/build/src/index.js
D:/SE/Web/React/storybook/node_modules/gtoken/build/src/index.js:65
62 |
63 | var pify = require("pify");
64 |
> 65 | var readFile = pify(fs.readFile);
66 | var GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token';
67 | var GOOGLE_REVOKE_TOKEN_URL =
'https://accounts.google.com/o/oauth2/revoke?token=';
68 |