Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在cli上部署云功能;Firebase配置变量不可用;_Firebase_Google Cloud Platform_Google Cloud Functions - Fatal编程技术网

在cli上部署云功能;Firebase配置变量不可用;

在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

正在尝试使用firebase sdk配置环境变量。它包含一个将在谷歌云功能中使用的令牌

我已经跟踪文档到了一个tee,当我尝试重新部署云函数时,我遇到了这个错误

我在index.js文件的顶部有这些

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。我提到,所有内容都是最新的,因为我今天才安装它们。我现在也有同样的问题,使用最新版本。我也有同样的问题。你找到解决方案了吗?不幸的是,没有。