在cli上部署云功能;Firebase配置变量不可用;
正在尝试使用firebase sdk配置环境变量。它包含一个将在谷歌云功能中使用的令牌 我已经跟踪文档到了一个tee,当我尝试重新部署云函数时,我遇到了这个错误 我在index.js文件的顶部有这些在cli上部署云功能;Firebase配置变量不可用;,firebase,google-cloud-platform,google-cloud-functions,Firebase,Google Cloud Platform,Google Cloud Functions,正在尝试使用firebase sdk配置环境变量。它包含一个将在谷歌云功能中使用的令牌 我已经跟踪文档到了一个tee,当我尝试重新部署云函数时,我遇到了这个错误 我在index.js文件的顶部有这些 const functions = require("firebase-functions"); const token = functions.config().slack.token; 这是我的package.json文件 { "name": "quincygeorge", "ver
const functions = require("firebase-functions");
const token = functions.config().slack.token;
这是我的package.json文件
{
"name": "quincygeorge",
"version": "1.0.0",
"description": "smart-office-assistant",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Jonathan Puc",
"license": "ISC",
"dependencies": {
"firebase-admin": "^5.5.1",
"firebase-functions": "^0.7.3",
"slack": "^9.1.0"
}
}
如文档中所述,在尝试运行之前,我先运行了“firebase部署--仅函数”
“gcloud测试版函数部署myfunction--暂存bucket mybucket--触发http”
再说一遍。但我还是犯了这个错误
我的firebase工具和所有模块都是最新的,因为我今天才安装它们。错误消息抱怨您的firebase CLI版本 更新至最新版本。3.16.0在撰写本文时
npm update -g firebase-tools
现在是3.16.0。我提到,所有内容都是最新的,因为我今天才安装它们。我现在也有同样的问题,使用最新版本。我也有同样的问题。你找到解决方案了吗?不幸的是,没有。