{"record":{"id":"3e7f6bd349feee43","repo":"nodejs/node","slug":"item-s-depends-on-missing-item-s","errorCode":null,"errorMessage":"Item %s depends on missing item %s\n","messagePattern":"Item (.+?) depends on missing item (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"deps/icu-small/source/tools/toolutil/package.cpp","lineNumber":1228,"sourceCode":"Package::getItemCount() const {\n    return itemCount;\n}\n\nconst Item *\nPackage::getItem(int32_t idx) const {\n    if (0 <= idx && idx < itemCount) {\n        return &items[idx];\n    }\n    return nullptr;\n}\n\nvoid\nPackage::checkDependency(void *context, const char *itemName, const char *targetName) {\n    // check dependency: make sure the target item is in the package\n    Package* me = static_cast<Package*>(context);\n    if(me->findItem(targetName)<0) {\n        me->isMissingItems=true;\n        fprintf(stderr, \"Item %s depends on missing item %s\\n\", itemName, targetName);\n    }\n}\n\nUBool\nPackage::checkDependencies() {\n    isMissingItems=false;\n    enumDependencies(this, checkDependency);\n    return !isMissingItems;\n}\n\nvoid\nPackage::enumDependencies(void *context, CheckDependency check) {\n    int32_t i;\n\n    for(i=0; i<itemCount; ++i) {\n        enumDependencies(items+i, context, check);\n    }\n}","sourceCodeStart":1210,"sourceCodeEnd":1246,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/toolutil/package.cpp#L1210-L1246","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before: custom package missing a dependency\nicupkg -a in.dat -r 'icudt68l/res_index.res' custom.dat\nicupkg custom.dat   # warns: X depends on missing res_index.res\n\n# after: keep the dependency target\nicupkg -a in.dat -r 'icudt68l/root.res,icudt68l/res_index.res' custom.dat","handlingStrategy":"validation","validationCode":"// Before relying on a custom .dat, list items and verify each dependency\n// target is present. icupkg itself can do this: 'icupkg -l' lists items.\n// Shell preflight:\n//   icupkg -l custom.dat | sort > present.txt\n//   # for each dependency target reported, grep present.txt\n// In code, call Package::checkDependencies() and treat false as a soft failure\n// (warn the user, do not ship the package).","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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()."],"tags":["icu","icupkg","dependencies","data-integrity","build-tool","warning"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}