{"record":{"id":"588f7ec5e48b035a","repo":"affaan-m/ECC","slug":"unknown-install-modules-unknownmoduleids-join","errorCode":null,"errorMessage":"Unknown install modules: ${unknownModuleIds.join(', ')}","messagePattern":"Unknown install modules: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":261,"sourceCode":"  if (unsupportedTargets.length > 0) {\n    throw new Error(\n      `Install module ${moduleId} has unsupported targets: ${unsupportedTargets.join(', ')}`\n    );\n  }\n\n  return normalizedTargets;\n}\n\nfunction assertKnownModuleIds(moduleIds, manifests) {\n  const unknownModuleIds = dedupeStrings(moduleIds)\n    .filter(moduleId => !manifests.modulesById.has(moduleId));\n\n  if (unknownModuleIds.length === 1) {\n    throw new Error(`Unknown install module: ${unknownModuleIds[0]}`);\n  }\n\n  if (unknownModuleIds.length > 1) {\n    throw new Error(`Unknown install modules: ${unknownModuleIds.join(', ')}`);\n  }\n}\n\nfunction intersectTargets(modules) {\n  if (!Array.isArray(modules) || modules.length === 0) {\n    return [];\n  }\n\n  return SUPPORTED_INSTALL_TARGETS.filter(target => (\n    modules.every(module => Array.isArray(module.targets) && module.targets.includes(target))\n  ));\n}\n\nfunction getManifestPaths(repoRoot = DEFAULT_REPO_ROOT) {\n  return {\n    modulesPath: path.join(repoRoot, 'manifests', 'install-modules.json'),\n    profilesPath: path.join(repoRoot, 'manifests', 'install-profiles.json'),\n    componentsPath: path.join(repoRoot, 'manifests', 'install-components.json'),","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L243-L279","documentation":"Plural counterpart of 175: assertKnownModuleIds collects all unknown ids and throws this form when two or more are unknown. Same trigger but the request contained multiple bad ids at once.","triggerScenarios":"Caller passes several unknown module ids in one request (e.g. --modules foo,bar,baz where none exist). Also triggered by profiles or component definitions that list multiple missing module ids.","commonSituations":"Bulk CLI request with multiple typos; profile authored against a different manifest set; renamed bulk of modules; downstream consumer passing programmatic module lists without validating against the manifest first.","solutions":["Cross-check each id in the comma-separated list against `modules[].id` in install-modules.json.","Fix typos / rename mappings for all listed ids.","Drop any ids that no longer exist from the request.","Add a preflight validation step in the caller that intersects requested ids with manifest ids."],"exampleFix":"// before: ./install.sh --target claude --modules rules-coree,agents-coree\n// after:  ./install.sh --target claude --modules rules-core,agents-core","handlingStrategy":"validation","validationCode":"function filterUnknownModuleIds(ids, manifests) {\n  const known = new Set(manifests.modules.map(m => m.id));\n  return [...new Set(ids)].filter(id => !known.has(id));\n}\n// before resolveInstallModules: assert filterUnknownModuleIds(requested, manifests).length === 0","typeGuard":"function areAllKnownModuleIds(ids, manifests) {\n  return ids.every(id => manifests.modulesById.has(id));\n}","tryCatchPattern":"try {\n  resolveInstallModules(moduleIds, options);\n} catch (err) {\n  if (err.message.startsWith('Unknown install modules: ')) {\n    // parse comma list, drop or rename each, retry\n  } else throw err;\n}","preventionTips":["Bulk-validate module id lists against the manifest before forwarding to the installer.","Maintain a rename map when modules are renamed and surface deprecation warnings.","Add a preflight lint step in automation scripts.","Snapshot the manifest id list in tests so renames break the test suite visibly."],"tags":["manifest","validation","install","modules"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}