When you update cloud function environment variables, the config values are not accessible when using the local node.js emulator.
On a project with no environment config variables:
- Set a new value
firebase functions:config:set x=true
- Get the config variables
firebase functions:config:get
(shows the new value) - Deploy the functions
firebase deploy --only functions
- Run the local emulator and log out the
functions.config{}
- Output:
{}
(empty object)
There is no mention in the environment config docs but I am assuming it is possible to use the same environment config locally (or a local alternative)?
Best Answer
The answer was in the local emulator documentation.