You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the command firebase functions:config:export throws the error
[REQUIRED] Expected behavior
The config variables should be exported
[REQUIRED] Actual behavior
Error output:
[info] i Importing configs from projects: [teamapps, single-station-364002, teamapps-france, teamapps-uat]
[debug] [2024-04-23T16:36:25.867Z] TypeError: Cannot read properties of undefined (reading 'replace')
at escape (/Users/tahirshakir/.nvm/versions/node/v18.16.1/lib/node_modules/firebase-tools/lib/functions/runtimeConfigExport.js:128:14)
at /Users/tahirshakir/.nvm/versions/node/v18.16.1/lib/node_modules/firebase-tools/lib/functions/runtimeConfigExport.js:131:65
at Array.map (<anonymous>)
at Object.toDotenvFormat (/Users/tahirshakir/.nvm/versions/node/v18.16.1/lib/node_modules/firebase-tools/lib/functions/runtimeConfigExport.js:131:24)
at /Users/tahirshakir/.nvm/versions/node/v18.16.1/lib/node_modules/firebase-tools/lib/commands/functions-config-export.js:110:56
at Array.map (<anonymous>)
at Command.actionFn (/Users/tahirshakir/.nvm/versions/node/v18.16.1/lib/node_modules/firebase-tools/lib/commands/functions-config-export.js:110:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error]
[error] Error: An unexpected error has occurred.
The text was updated successfully, but these errors were encountered:
Hey @tahir606, thanks for reaching out and sharing your debug logs. I’m able to reproduce the error you mentioned. From what I can gather, it occurs when at least one of your env variables doesn’t have a value set, resulting in it being undefined. I’ll raise this to our engineering team to see what we can do here.
Thanks @aalej, That is great to know. What would be the solution here? Setting a value to the env variable? And if so how can I find out which one is it?
Because when I do firebase:config:get I get the complete object with all the envs.
That's interesting, I was under the assumption that firebase:config:get was returning something like:
{
..."my": {
"test": {}
}
...
}
Got the config above by running firebase functions:config:set my.test.id=. Setting the value of the variable should fix the issue. Any chance you could share an overview of the output of running firebase:config:get? Please change the string values in the output to remove any personal identifiable information.
[REQUIRED] Environment info
firebase-tools: 13.7.3
Platform: macOS
[REQUIRED] Steps to reproduce
Running the command
firebase functions:config:export
throws the error[REQUIRED] Expected behavior
The config variables should be exported
[REQUIRED] Actual behavior
Error output:
The text was updated successfully, but these errors were encountered: