在尝试运行使用Google-Cloud-Video-Intelligence API的Nodejs应用程序时,我收到一个错误:
(node:20730) UnhandledPromiseRejectionWarning: Error: 7 PERMISSION_DENIED: Cloud Video Intelligence API has not been used in project firebase-cli before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/videointelligence.googleapis.com/overview?project=firebase-cli then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
at new createStatusError (/home/warcram/node_modules/grpc/src/client.js:64:15)
at /home/warcram/node_modules/grpc/src/client.js:583:15
(node:20730) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20730) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.e现在,如果我使用的是firebase-cli项目,这将是可修复的,但是它已经被删除了。我现在正在尝试使用一个单独的项目。我在新项目的同一目录中使用了gcloud init,但是在运行应用程序时,我仍然收到相同的错误。
有没有什么办法可以取消初始化firebase-cli项目,然后继续我的新项目?
非常感谢
发布于 2018-04-15 00:54:10
解决了这个问题后,我需要将GOOGLE_APPLICATION_CREDENTIALS环境变量设置为初始化json文件。我这样做了,我的程序使用了正确的项目。感谢你的意见,希望这对将来有所帮助。
https://stackoverflow.com/questions/49831734
复制相似问题