Search code examples
firebasegoogle-cloud-functionsfirebase-cli

same error after updating to CLI 3.17.5 : Firebase config variables are not available. Please use the latest version of the Firebase CLI


After updating to the latest Firebase CLI tool 3.17.5 from 3.17.4 I am having this error when I try to emulate the functions locally ?

how I can solve this problem?, I tried to update and refresh many times without success.

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

Solution

  • The error message isn't so much telling you about the CLI which you installed with firebase-tools. It's specifically telling you about the firebase-functions dependency installed in your functions folder. Please take its specific advice and install the latest firebase-functions module in your project.