This is a continuation of troubleshooting this problem and a separate issue related to implementing a suggested solution.
I am attempting to consume Firebase function configuration from a locally-served environment as outlined here but I get an unexpected error.
- I create a ".runtimeconfig.json" file within my functions directory containing this:
{ "auth": { "clientid": MY_CLIENT_ID, "signoutreturnto": SOME_URL, "responsetype": SOME_URL, "redirecturi": SOME_OTHER_URL, "scope": SOME_OTHER_STRING, "domain": SOME_DOMAIN } }
I execute the following commands from the firebase CLI (within the functions directory):
- firebase functions:config:get > .runtimeconfig.json
- firebase experimental:functions:shell
I execute my config function via the cli:
config()
I get the following error output in the console:
config()
TypeError: config is not a function
at repl:1:1
at ContextifyScript.Script.runInContext (vm.js:32:29)
at REPLServer.defaultEval (repl.js:341:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:536:10)
at emitOne (events.js:96:13)
at REPLServer.emit (events.js:191:7)
at REPLServer.Interface._onLine (readline.js:241:10)
at REPLServer.Interface._line (readline.js:590:8)
my other functions, bigben & firebaseConfig execute as expected from the CLI