{"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":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":643,"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":625,"sourceCodeEnd":661,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-manifests.js#L625-L661","documentation":"resolveInstallPlan throws this when a requested module's dependency chain reaches a module that has been excluded (by profile exclusions or target default exclusions), and the excluded module is reached as a dependency rather than directly. Directly-excluded requests are silently filtered out, but a hard dependency on an excluded module is a plan conflict the installer cannot resolve, so it names both the depending module and the exclusion owners.","triggerScenarios":"Calling resolveInstallPlan (via plan or runTests) with a module that depends on a module listed in the profile's excluded modules or a target's default exclusions — e.g. installing module A when A's `dependencies` array includes a module excluded for the chosen target.","commonSituations":"Customizing an install profile with an exclusion like 'docs' or a platform target (e.g. codex) whose default-excluded modules are still depended on by another requested module; editing manifests/install-modules.json and adding a dependency on a module that target adapters exclude.","solutions":["Remove the module that depends on the excluded module from the request, or pick a different module","Un-exclude the dependency (remove it from profile exclusions or pick a target that does not default-exclude it)","Fix manifests/install-modules.json so the depending module no longer lists the excluded dependency","Read the message: moduleId is the excluded dependency, dependencyOf is the depending module, and owners names who excluded it"],"exampleFix":"// before (profile)\n{ \"modules\": [\"mcp-configs\"], \"exclude\": [\"mcp-configs-context7\"] }\n// after — exclude only a module nothing depends on, or drop the exclusion\n{ \"modules\": [\"mcp-configs\"] }","handlingStrategy":"validation","validationCode":"// Before resolving, check that no requested module depends on an excluded one\nconst excluded = new Set(profile.exclude || []);\nfor (const id of requestedModules) {\n  for (const dep of manifests.modulesById.get(id).dependencies) {\n    if (excluded.has(dep)) throw new Error(`${id} depends on excluded ${dep}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const plan = resolveInstallPlan(options);\n} catch (e) {\n  if (/depends on excluded module/.test(e.message)) {\n    // surface the conflict to the user, let them adjust profile exclusions\n  } else throw e;\n}","preventionTips":["Keep profile exclusions limited to leaf modules nothing else depends on","Run `npm test` install-plan tests after editing exclusions in profiles","Read the exclusion owners in the message before changing the profile"],"tags":["install","dependencies","config-conflict"],"backgroundTag":"conflicting-config-options","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}