affaan-m/ECC · error · Error

Unknown install module: ${unknownModuleIds[0]}

Error message

Unknown install module: ${unknownModuleIds[0]}

What it means

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.

Source

Thrown at scripts/lib/install-manifests.js:257

    throw new Error(`Install module ${moduleId} has invalid targets; expected an array of supported target ids`);
  }

  const unsupportedTargets = normalizedTargets.filter(target => !SUPPORTED_INSTALL_TARGETS.includes(target));
  if (unsupportedTargets.length > 0) {
    throw new Error(
      `Install module ${moduleId} has unsupported targets: ${unsupportedTargets.join(', ')}`
    );
  }

  return normalizedTargets;
}

function assertKnownModuleIds(moduleIds, manifests) {
  const unknownModuleIds = dedupeStrings(moduleIds)
    .filter(moduleId => !manifests.modulesById.has(moduleId));

  if (unknownModuleIds.length === 1) {
    throw new Error(`Unknown install module: ${unknownModuleIds[0]}`);
  }

  if (unknownModuleIds.length > 1) {
    throw new Error(`Unknown install modules: ${unknownModuleIds.join(', ')}`);
  }
}

function intersectTargets(modules) {
  if (!Array.isArray(modules) || modules.length === 0) {
    return [];
  }

  return SUPPORTED_INSTALL_TARGETS.filter(target => (
    modules.every(module => Array.isArray(module.targets) && module.targets.includes(target))
  ));
}

function getManifestPaths(repoRoot = DEFAULT_REPO_ROOT) {

View on GitHub (pinned to 01e15490f0)

Solutions

  1. List available ids: inspect `modules[].id` in manifests/install-modules.json or run the list-modules command.
  2. Correct the id spelling in the CLI flag or profile entry.
  3. If the module was renamed, switch to the new id.
  4. If the module was removed, drop it from the request or restore it in the manifest.

Example fix

// before: ./install.sh --target claude --modules rules-coree
// after:  ./install.sh --target claude --modules rules-core
Defensive patterns

Strategy: validation

Validate before calling

function knownModuleIds(manifests) {
  return manifests.modules.map(m => m.id);
}
function resolveModuleIds(ids, manifests) {
  const known = new Set(knownModuleIds(manifests));
  return ids.filter(id => !known.has(id));
}
// before resolveInstallModules: assert resolveModuleIds(requested, manifests).length === 0

Type guard

function isKnownModuleId(id, manifests) {
  return manifests.modulesById.has(id);
}

Try / catch

try {
  resolveInstallModules(moduleIds, options);
} catch (err) {
  if (err.message.startsWith('Unknown install module: ')) {
    // list available ids, suggest the closest match, retry
  } else throw err;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/b150206658b195fc. Report an issue: GitHub.