更新到CLI 3.17.5后出现相同的错误:Firebase配置变量不可用。请使用最新版本的Firebase CLI

时间:2018-03-09 07:57:51

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

从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...

1 个答案:

答案 0 :(得分:0)

错误消息并未告诉您使用firebase-tools安装的CLI。它具体告诉您有关函数文件夹中安装的firebase-functions依赖项的信息。请参考其具体建议,并在项目中安装最新的firebase-functions模块。

相关问题