首页 > 解决方案 > NodeJS Google Vision 无法在当前环境中检测到项目 ID

问题描述

在 Ubuntu 环境下,NodeJS Google Vision 报错:

错误:无法在当前环境中检测到项目 ID。

即使我已经通过了 json 凭证

$ export GOOGLE_APPLICATION_CREDENTIALS=/var/credential_google.json"

请帮忙。

标签: node.jsgoogle-vision

解决方案


作为一个快速破解,你可以试试这个:

$ GOOGLE_APPLICATION_CREDENTIALS="/var/credential_google.json" node app.js

推荐阅读