{"record":{"id":"a97cf172d2f53eef","repo":"affaan-m/ECC","slug":"unknown-install-module-moduleid","errorCode":null,"errorMessage":"Unknown install module: ${moduleId}","messagePattern":"Unknown install module: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"scripts/lib/install-manifests.js","lineNumber":612,"sourceCode":"  }\n\n  if (effectiveRequestedIds.length === 0) {\n    throw new Error('Selection excludes every requested install module');\n  }\n\n  const selectedIds = new Set();\n  const skippedTargetIds = new Set();\n  const excludedIds = new Set([\n    ...excludedModuleIds,\n    ...targetDefaultExclusions.map(exclusion => exclusion.moduleId),\n  ]);\n  const visitingIds = new Set();\n  const resolvedIds = new Set();\n\n  function resolveModule(moduleId, dependencyOf, rootRequesterId) {\n    const module = manifests.modulesById.get(moduleId);\n    if (!module) {\n      throw new Error(`Unknown install module: ${moduleId}`);\n    }\n\n    if (excludedModuleOwners.has(moduleId)) {\n      if (dependencyOf) {\n        const owners = excludedModuleOwners.get(moduleId) || [];\n        throw new Error(\n          `Module ${dependencyOf} depends on excluded module ${moduleId}${owners.length > 0 ? ` (excluded by ${owners.join(', ')})` : ''}`\n        );\n      }\n      return;\n    }\n\n    const supportsTarget = !target\n      || (\n        readModuleTargetsOrThrow(module).includes(target)\n        && (!targetAdapter || targetAdapter.supportsModule(module, targetPlanningInput))\n      );\n","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L594-L630","documentation":"Thrown by the internal resolveModule() recursion during plan resolution when a module id (either a requested id or a dependency id encountered while walking module.dependencies) is not present in manifests.modulesById. This indicates a manifest integrity problem: a component or profile references a module id that install-modules.json does not define.","triggerScenarios":"A profile in install-profiles.json lists 'foo-bar' but install-modules.json has no such module; a component lists a module that was renamed; a module's dependencies array references a removed id; install-modules.json is partially cloned.","commonSituations":"Repo is on a branch that edited one manifest file but not the others; a custom module was deleted without updating its dependents; a fork renamed modules without updating components; partial git checkout.","solutions":["Run validateInstallModuleIds() on the suspect list to surface unknown ids.","Re-clone or git checkout HEAD -- manifests/ to restore a consistent set.","Inspect install-modules.json for the expected module id and update references accordingly.","If you maintain a fork, run the manifest consistency tests (npm test) before invoking the installer."],"exampleFix":"// before — manifests reference a missing module\nresolveInstallPlan({ target: 'claude', moduleIds: ['rules-core', 'old-name'] });\n// after — validate first, then call\nconst { validateInstallModuleIds } = require('./scripts/lib/install-manifests');\nconst moduleIds = validateInstallModuleIds(['rules-core', 'old-name']); // throws 'Unknown install module: old-name'\nresolveInstallPlan({ target: 'claude', moduleIds });","handlingStrategy":"validation","validationCode":"const { validateInstallModuleIds } = require('./scripts/lib/install-manifests');\nconst moduleIds = validateInstallModuleIds(options.moduleIds || []); // throws 'Unknown install module: <id>' with a cleaner message\nresolveInstallPlan({ ...options, moduleIds });","typeGuard":null,"tryCatchPattern":"try {\n  return resolveInstallPlan(options);\n} catch (err) {\n  if (/^Unknown install module:/.test(err.message)) {\n    // manifest integrity issue — surface to operator, do not retry\n    throw new Error(`Manifest integrity error: ${err.message}. Run 'git checkout HEAD -- manifests/'.`);\n  }\n  throw err;\n}","preventionTips":["Run validateInstallModuleIds() on any externally-supplied module list before planning.","Run npm test (manifest consistency tests) before invoking the installer in CI."],"tags":["install","manifest","integrity","dependency-resolution"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}