firebase / firebase/firebase-tools

Functions config export failing with unexpected error

Open
#7,036 5 comments 0 reactions 1 assignee Claimed by @aalej View on GitHub
api: functions reproducible type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [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:
```
[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 ()
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 ()
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.

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.