nodejs/node · error
%s: cannot combine --formatVersion 1 with --writePoolBundle
Error message
%s: cannot combine --formatVersion 1 with --writePoolBundle or --usePoolBundle\n
What it means
genrb forbids combining formatVersion 1 with pool bundles. Pool bundles (written via --writePoolBundle or consumed via --usePoolBundle) rely on the strings-v2 layout and a keys pool that only exists in formatVersion 2 and above; formatVersion 1 predates that infrastructure. The check at genrb.cpp:169-173 catches s[0] == '1' together with either pool flag being set and sets illegalArg=true.
Source
Thrown at deps/icu-small/source/tools/genrb/genrb.cpp:172
illegalArg = true;
}
if(options[WRITE_POOL_BUNDLE].doesOccur && options[USE_POOL_BUNDLE].doesOccur) {
fprintf(stderr, "%s: cannot combine --writePoolBundle and --usePoolBundle\n", argv[0]);
illegalArg = true;
}
if (options[ICU4X_MODE].doesOccur && !options[UCADATA].doesOccur) {
fprintf(stderr, "%s: --icu4xMode requires --ucadata\n", argv[0]);
illegalArg = true;
}
if(options[FORMAT_VERSION].doesOccur) {
const char *s = options[FORMAT_VERSION].value;
if(uprv_strlen(s) != 1 || (s[0] < '1' || '3' < s[0])) {
fprintf(stderr, "%s: unsupported --formatVersion %s\n", argv[0], s);
illegalArg = true;
} else if(s[0] == '1' &&
(options[WRITE_POOL_BUNDLE].doesOccur || options[USE_POOL_BUNDLE].doesOccur)
) {
fprintf(stderr, "%s: cannot combine --formatVersion 1 with --writePoolBundle or --usePoolBundle\n", argv[0]);
illegalArg = true;
} else {
setFormatVersion(s[0] - '0');
}
}
if((options[JAVA_PACKAGE].doesOccur || options[BUNDLE_NAME].doesOccur) &&
!options[WRITE_JAVA].doesOccur) {
fprintf(stderr,
"%s error: command line argument --java-package or --bundle-name "
"without --write-java\n",
argv[0]);
illegalArg = true;
}
if(options[VERSION].doesOccur) {
fprintf(stderr,
"%s version %s (ICU version %s).\n"View on GitHub (pinned to 1b2de5e052)
Solutions
- Use --formatVersion 2 or 3 (or omit it) when enabling pool bundles: `genrb --formatVersion 3 --usePoolBundle pool/ root.txt`.
- Drop --writePoolBundle / --usePoolBundle if you truly must emit formatVersion 1 files.
- Regenerate the pool bundle with the same or higher formatVersion as the consuming bundles.
Example fix
// before genrb --formatVersion 1 --usePoolBundle ./pool root.txt // after genrb --formatVersion 3 --usePoolBundle ./pool root.txt
Defensive patterns
Strategy: validation
Validate before calling
# Reject formatVersion 1 combined with pool-bundle flags
if [ "$FORMAT_VERSION" = "1" ] && { [ -n "$WRITE_POOL_BUNDLE" ] || [ -n "$USE_POOL_BUNDLE" ]; }; then
echo "ERROR: formatVersion 1 is incompatible with pool bundles" >&2
exit 2
fi Prevention
- When introducing pool bundles, bump formatVersion to 3 in the same commit.
- Document the formatVersion floor for pool-bundle builds in your data build README.
When it happens
Trigger: Running `genrb --formatVersion 1 --writePoolBundle out/ root.txt` or `genrb --formatVersion 1 --usePoolBundle pool/ root.txt`. Either pool flag combined with formatVersion 1 triggers the branch.
Common situations: Trying to produce smaller backwards-compatible .res files while also adopting the pool-bundle optimization; copy-pasting a formatVersion 1 flag from an older build script into a modern data build that enables pool bundles.
Related errors
- %s: unsupported --formatVersion %s\n
- U_INVALID_FORMAT_ERROR
- %s: cannot combine --writePoolBundle and --usePoolBundle\n
- %s error: command line argument --java-package or --bundle-n
- unable to create an empty bundle for the pool keys: %s
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/14e5f05d8c1aba18.
Report an issue: GitHub.