{"record":{"id":"1b1978882778d35e","repo":"affaan-m/ECC","slug":"module-dependencyof-depends-on-excluded-module","errorCode":null,"errorMessage":"Module ${dependencyOf} depends on excluded module ${moduleId}${owners.length > 0 ? ` (excluded by ${owners.join(', ')})` : ''}","messagePattern":"Module (.+?) depends on excluded module (.+?)(.+?)\\)` : ''\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":618,"sourceCode":"  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\n    if (!supportsTarget) {\n      if (dependencyOf) {\n        skippedTargetIds.add(rootRequesterId || dependencyOf);\n        return false;\n      }\n      skippedTargetIds.add(moduleId);","sourceCodeStart":600,"sourceCodeEnd":636,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L600-L636","documentation":"Thrown by resolveModule() when a module is reached as a dependency of another module (dependencyOf is set) AND that module id is in the excludedModuleOwners map. Direct root-level excludes are silently dropped, but a dependency exclude would leave the depending module broken, so it is a hard error. The message names both the depending module and the components that excluded the dependency.","triggerScenarios":"Excluding component 'lang:rust' while including a profile/component whose module declares a dependency on a rust module; target-default exclusions that drop a module another selected module depends on.","commonSituations":"User excludes a 'baseline' or 'lang' component thinking it is optional when a selected capability module depends on it; OpenCode default exclusions intersect a dependency of a requested module.","solutions":["Read the message: it names the depending module and the excluding components — drop the relevant exclude.","Switch from component-level exclude to skipping the depending module entirely.","Inspect the dependency graph (module.dependencies in install-modules.json) before excluding.","If the exclude is target-default, pass an explicit profileId that does not pull in the dependent module."],"exampleFix":"// before\nresolveInstallPlan({\n  target: 'claude',\n  includeComponentIds: ['capability:semantic-search'], // depends on rules-core\n  excludeComponentIds: ['baseline:rules'],            // excludes rules-core\n});\n// after — keep the dependency\nresolveInstallPlan({ target: 'claude', includeComponentIds: ['capability:semantic-search'] });","handlingStrategy":"try-catch","validationCode":"const { loadInstallManifests } = require('./scripts/lib/install-manifests');\nconst manifests = loadInstallManifests(options);\nconst excludedModuleIds = new Set(expandToModules(options.excludeComponentIds || [], manifests));\nconst requestedModuleIds = expandToModules(options.includeComponentIds || [], manifests);\nconst dependents = collectDependents(requestedModuleIds, manifests);\nconst conflict = [...excludedModuleIds].filter(id => dependents.has(id));\nif (conflict.length > 0) {\n  throw new Error(`Cannot exclude ${conflict.join(', ')} — needed by requested modules`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  return resolveInstallPlan(options);\n} catch (err) {\n  if (/depends on excluded module/.test(err.message)) {\n    // strip the offending exclude and retry, or surface to user\n    throw err;\n  }\n  throw err;\n}","preventionTips":["Before excluding a component, inspect the dependency graph in install-modules.json.","Prefer excluding leaf modules over baseline/lang components that others depend on."],"tags":["install","dependency-resolution","exclude","manifest"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}