node.js - NodeJS Google Vision 无法在当前环境中检测到项目 ID
问题描述
在 Ubuntu 环境下,NodeJS Google Vision 报错:
错误:无法在当前环境中检测到项目 ID。
即使我已经通过了 json 凭证
$ export GOOGLE_APPLICATION_CREDENTIALS=/var/credential_google.json"
请帮忙。
解决方案
作为一个快速破解,你可以试试这个:
$ GOOGLE_APPLICATION_CREDENTIALS="/var/credential_google.json" node app.js
推荐阅读
- r - 如何让基本示例 Shiny 应用程序正常工作?
- elixir - PhoenixLiveView 更新视图时如何启动动画
- flutter - 从列表中删除元素后的英雄动画 - 如何阻止它尝试为空白框设置动画?
- python-3.x - 使用 ibm_db 遍历 python 元组并批量加载到数据库表中
- google-app-engine - 为 go1.12 灵活部署到 Google App Engine 失败
- r - 如何在 R 中标记不同的缺失数据
- php - 如何在数据库中插入图像并能够再次显示?
- flutter - 如何使用 NavigatorObserver 更新 ChangeNotifier
- express - 正确格式化来自 VueJS 的身份验证请求对象
- clickhouse - 大结果在任何地方都很慢,但在本地