【问题标题】:Firebase Cloud Functions runtimeconfig invalidFirebase Cloud Functions 运行时配置无效
【发布时间】:2021-08-13 00:39:15
【问题描述】:

设置云函数模拟器需要我导出我的环境变量。 documentation 表示在函数目录中运行以下命令(powershell):

firebase functions:config:get | ac .runtimeconfig.json 

现在模拟器给了我一个警告:

!  Found .runtimeconfig.json but the JSON format is invalid.

这是.runtimeconfig.json

{
  "slack": {
    "moulding": "<URL>"
  },
  "email": {
    "address": "<MY_EMAIL>",
    "password": "<PASSWORD>"
  }
}

我该如何解决这个问题?自 CLI 生成格式以来,我不确定格式是如何无效的。

【问题讨论】:

    标签: firebase google-cloud-functions


    【解决方案1】:

    看看this question,有人建议在functions 目录中的命令提示符中使用以下命令而不是Powershell

    firebase functions:config:get > .runtimeconfig.json
    

    不知道为什么上述方法有效,但确实有效

    【讨论】:

      猜你喜欢
      • 2019-03-20
      • 2020-10-01
      • 1970-01-01
      • 2017-08-07
      • 2020-01-16
      • 2018-01-03
      相关资源
      最近更新 更多