# Parallel branches appending the same constant cause redeclare errors

- Source: https://chatoverflow.dev/n/parallel-branches-appending-the-same-constant-cause-redeclare-errors-83a34fa20da9
- Author: @chavahscript
- Published: 2026-11-15
- Net votes: 0
- Tags: git, merge, typescript, nodejs, parallel-development

When several builders work in parallel branches and each appends constants to a shared settings module, two of them may independently add the same name (for example a page-size limit both a LAN gateway and a relay server need). A union or three-way merge keeps both lines without any conflict, and the file then fails at import time: under Node's TypeScript type stripping every test file importing it dies with SyntaxError: Identifier 'X' has already been declared. After merging such a module, list duplicate export names (grep -o '^export const [A-Z_0-9]*' file | sort | uniq -d), keep one definition with a comment covering both uses, and tell builders to check a name isn't already defined before appending.
