nodejs/node · error
--ucadata was used with UCONFIG_NO_COLLATION
Error message
--ucadata was used with UCONFIG_NO_COLLATION
What it means
The --ucadata flag triggers CollationRoot::forceLoadFromFile(), which needs the collation framework. When ICU was compiled with UCONFIG_NO_COLLATION defined, collation is compiled out entirely, so loading ucadata is impossible. The #else branch at genrb.cpp:317-319 prints this message and returns the current status. This is a compile-time configuration mismatch, not a runtime data problem.
Source
Thrown at deps/icu-small/source/tools/genrb/genrb.cpp:318
}
status = U_ZERO_ERROR;
if(options[WRITE_JAVA].doesOccur) {
write_java = true;
outputEnc = options[WRITE_JAVA].value;
}
if(options[WRITE_XLIFF].doesOccur) {
write_xliff = true;
if(options[WRITE_XLIFF].value != nullptr){
xliffOutputFileName = options[WRITE_XLIFF].value;
}
}
if (options[UCADATA].doesOccur) {
#if !UCONFIG_NO_COLLATION
CollationRoot::forceLoadFromFile(options[UCADATA].value, status);
#else
fprintf(stderr, "--ucadata was used with UCONFIG_NO_COLLATION\n");
return status;
#endif
}
initParser();
/*added by Jing*/
if(options[LANGUAGE].doesOccur) {
language = options[LANGUAGE].value;
}
LocalPointer<SRBRoot> newPoolBundle;
if(options[WRITE_POOL_BUNDLE].doesOccur) {
newPoolBundle.adoptInsteadAndCheckErrorCode(new SRBRoot(nullptr, true, status), status);
if(U_FAILURE(status)) {
fprintf(stderr, "unable to create an empty bundle for the pool keys: %s\n", u_errorName(status));
return status;
} else {View on GitHub (pinned to 1b2de5e052)
Solutions
- Rebuild ICU without UCONFIG_NO_COLLATION so collation support is available.
- Drop --ucadata from the genrb invocation if you genuinely do not need collation data.
- Align the build configuration of the genrb binary with the data set you are compiling.
Defensive patterns
Strategy: validation
Validate before calling
# If --ucadata is requested, ensure the genrb binary was built with collation
if [ -n "$UCADATA_FILE" ]; then
if pkg-config --exists icu-i18n 2>/dev/null && ! pkg-config --cflags icu-i18n | grep -q UCONFIG_NO_COLLATION; then
: # ok
else
echo "WARNING: ICU built without collation; --ucadata will fail" >&2
fi
fi Prevention
- Keep the build configuration of the genrb tool in lock-step with the feature set the data tree expects.
- When stripping ICU features for size, also strip the corresponding data-build flags.
When it happens
Trigger: Building ICU with -DUCONFIG_NO_COLLATION=1 (common on minimal/embedded builds) and then running a genrb invocation that passes --ucadata <file>.
Common situations: A stripped-down ICU build for a constrained target where collation was disabled to save space, then reusing that toolchain to compile locale data that still references ucadata; mixing a minimal ICU tool build with a full data tree.
Related errors
- couldn't open file %s
- An error occurred processing file %s. Error: %s
- U_MEMORY_ALLOCATION_ERROR
- CollationDataWriter::writeTailoring() failed: %s
- %s: error in command line argument "%s"\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/63d39b803b5a8eb2.
Report an issue: GitHub.