【问题标题】:same error after updating to CLI 3.17.5 : Firebase config variables are not available. Please use the latest version of the Firebase CLI更新到 CLI 3.17.5 后出现同样的错误:Firebase 配置变量不可用。请使用最新版本的 Firebase CLI
【发布时间】:2018-08-17 17:59:17
【问题描述】:

从 3.17.4 更新到最新的 Firebase CLI 工具 3.17.5 后,当我尝试在本地模拟这些功能时出现此错误?

我该如何解决这个问题?,我尝试更新和刷新很多次都没有成功。

-functions inside the functions directory.
!  functions: Error from emulator. Error occurred while parsing your function triggers. Please ensure you have the latest firebase-functions SDK by running "npm i --save firebase-functions@latest" inside your functions folder.

Error: Firebase config variables are not available. Please use the latest version of the Firebase CLI to deploy this function.
    at init (D:\android-projects\firebase\functions\node_modules\firebase-functions\lib\config.js:55:15)
    at Object.config (D:\android-projects\firebase\functions\node_modules\firebase-functions\lib\config.js:29:9)
    at Object.<anonymous> (D:\android-projects\firebase\functions\index.js:56:31)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
Shutting down...

【问题讨论】:

  • 升级到 3.17.6 后问题消失了。

标签: firebase google-cloud-functions firebase-cli


【解决方案1】:

错误消息并没有告诉您您使用firebase-tools 安装的 CLI。它专门告诉您安装在您的函数文件夹中的firebase-functions 依赖项。请采纳其具体建议并在您的项目中安装最新的 firebase-functions 模块。

【讨论】:

  • 我运行所有更新命令没有成功 npm i --save firebase-functions@latest npm install firebase-functions@latest --save
  • 那么请提交一个包含完整复制步骤的错误(从 firebase 初始化的那一刻起)。 firebase.google.com/support/contact/bugs-features
  • 谢谢,知道如何恢复到旧版本我尝试通过 npm install -g firebase-tools@^3.17.4 安装它,但现在我遇到了新错误“!功能:无法模拟 helloWorld”
  • 现在有3.17.6版本。也许试试看? github.com/firebase/firebase-tools/releases/tag/v3.17.6
猜你喜欢
  • 2018-06-27
  • 1970-01-01
  • 2021-05-13
  • 1970-01-01
  • 2019-07-07
  • 2016-06-07
  • 1970-01-01
  • 2018-05-19
  • 1970-01-01
相关资源
最近更新 更多