nodejs/node · warning
Item %s depends on missing item %s
Error message
Item %s depends on missing item %s
What it means
Emitted by icupkg's dependency checker when an item in the package declares a dependency on another item that is not present in the package. Unlike the other errors this one does NOT call exit() — it sets isMissingItems=true and continues, acting as a warning printed to stderr.
Source
Thrown at deps/icu-small/source/tools/toolutil/package.cpp:1228
Package::getItemCount() const {
return itemCount;
}
const Item *
Package::getItem(int32_t idx) const {
if (0 <= idx && idx < itemCount) {
return &items[idx];
}
return nullptr;
}
void
Package::checkDependency(void *context, const char *itemName, const char *targetName) {
// check dependency: make sure the target item is in the package
Package* me = static_cast<Package*>(context);
if(me->findItem(targetName)<0) {
me->isMissingItems=true;
fprintf(stderr, "Item %s depends on missing item %s\n", itemName, targetName);
}
}
UBool
Package::checkDependencies() {
isMissingItems=false;
enumDependencies(this, checkDependency);
return !isMissingItems;
}
void
Package::enumDependencies(void *context, CheckDependency check) {
int32_t i;
for(i=0; i<itemCount; ++i) {
enumDependencies(items+i, context, check);
}
}View on GitHub (pinned to 1b2de5e052)
Solutions
- Review the printed item and target names; add the missing target item back into the package.
- Run 'icupkg -l <pkg>.dat' to list all present items and compare against the dependency target.
- If the dependency is intentionally removed, ignore the warning (checkDependencies returns false but does not abort).
- Rebuild the package from the full ICU data set to restore a consistent dependency graph.
Example fix
# before: custom package missing a dependency icupkg -a in.dat -r 'icudt68l/res_index.res' custom.dat icupkg custom.dat # warns: X depends on missing res_index.res # after: keep the dependency target icupkg -a in.dat -r 'icudt68l/root.res,icudt68l/res_index.res' custom.dat
Defensive patterns
Strategy: validation
Validate before calling
// Before relying on a custom .dat, list items and verify each dependency // target is present. icupkg itself can do this: 'icupkg -l' lists items. // Shell preflight: // icupkg -l custom.dat | sort > present.txt // # for each dependency target reported, grep present.txt // In code, call Package::checkDependencies() and treat false as a soft failure // (warn the user, do not ship the package).
Prevention
- Run icupkg dependency checks in your packaging script and fail the build on missing dependencies if shippability matters.
- When tree-shaking items, keep dependency roots (e.g. root.res, res_index.res).
- Log the full item list during package assembly for later auditing.
- Remember error 924 is a warning (non-fatal); callers must explicitly check the return of checkDependencies().
When it happens
Trigger: Package::checkDependencies calls enumDependencies, which iterates every item and invokes checkDependency(itemName, targetName). If findItem(targetName) < 0 for any target, the message prints and isMissingItems flips true.
Common situations: Custom .dat packages assembled by hand with a subset of items; tree-shaking that removed a dependency; version mismatch where dependency graph changed between ICU releases; locale data referencing a shared resource that was excluded.
Related errors
- Warning: The top level tag in the resource and language spec
- U_MEMORY_ALLOCATION_ERROR
- U_ILLEGAL_ARGUMENT_ERROR
- Error generating assembly code for data.
- -1
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/3e7f6bd349feee43.
Report an issue: GitHub.