{"record":{"id":"b150206658b195fc","repo":"affaan-m/ECC","slug":"unknown-install-module-unknownmoduleids-0","errorCode":null,"errorMessage":"Unknown install module: ${unknownModuleIds[0]}","messagePattern":"Unknown install module: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":257,"sourceCode":"    throw new Error(`Install module ${moduleId} has invalid targets; expected an array of supported target ids`);\n  }\n\n  const unsupportedTargets = normalizedTargets.filter(target => !SUPPORTED_INSTALL_TARGETS.includes(target));\n  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) {","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L239-L275","documentation":"assertKnownModuleIds checks every requested module id against manifests.modulesById and throws this singular form when exactly one id is unknown. Used by resolveInstallModules and listInstallComponents to fail fast before planning an install with a module the manifest does not define.","triggerScenarios":"Caller passes a single unknown module id to resolveInstallModules / listInstallComponents (e.g. via --modules foo-bar where foo-bar is not in install-modules.json). Also triggered when a profile references a deleted module id.","commonSituations":"User mistypes a module id on the CLI; profile was authored against a manifest that has since removed the module; renamed module (old id passed); a profile/component from a third party references an id not present in this repo's manifest.","solutions":["List available ids: inspect `modules[].id` in manifests/install-modules.json or run the list-modules command.","Correct the id spelling in the CLI flag or profile entry.","If the module was renamed, switch to the new id.","If the module was removed, drop it from the request or restore it in the manifest."],"exampleFix":"// before: ./install.sh --target claude --modules rules-coree\n// after:  ./install.sh --target claude --modules rules-core","handlingStrategy":"validation","validationCode":"function knownModuleIds(manifests) {\n  return manifests.modules.map(m => m.id);\n}\nfunction resolveModuleIds(ids, manifests) {\n  const known = new Set(knownModuleIds(manifests));\n  return ids.filter(id => !known.has(id));\n}\n// before resolveInstallModules: assert resolveModuleIds(requested, manifests).length === 0","typeGuard":"function isKnownModuleId(id, manifests) {\n  return manifests.modulesById.has(id);\n}","tryCatchPattern":"try {\n  resolveInstallModules(moduleIds, options);\n} catch (err) {\n  if (err.message.startsWith('Unknown install module: ')) {\n    // list available ids, suggest the closest match, retry\n  } else throw err;\n}","preventionTips":["Validate requested module ids against the manifest before install.","Auto-suggest closest matches when user input is unknown.","Pin module ids in automation to ids confirmed by the manifest.","Re-validate after upgrading the installer in case ids were renamed."],"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"}