affaan-m/ECC · error · Error

Unknown install target: ${target}. Expected one of ${SUPPORT

Error message

Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}

What it means

listInstallComponents accepts an optional `target` filter. If provided, it must be in SUPPORTED_INSTALL_TARGETS. Unknown values are rejected with the full valid list, matching the family validation above.

Source

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

  const manifests = loadInstallManifests(options);
  const normalizedModuleIds = dedupeStrings(moduleIds);
  assertKnownModuleIds(normalizedModuleIds, manifests);
  return normalizedModuleIds;
}

function listInstallComponents(options = {}) {
  const manifests = loadInstallManifests(options);
  const family = options.family || null;
  const target = options.target || null;

  if (family && !Object.hasOwn(COMPONENT_FAMILY_PREFIXES, family)) {
    throw new Error(
      `Unknown component family: ${family}. Expected one of ${Object.keys(COMPONENT_FAMILY_PREFIXES).join(', ')}`
    );
  }

  if (target && !SUPPORTED_INSTALL_TARGETS.includes(target)) {
    throw new Error(
      `Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`
    );
  }

  return manifests.components
    .filter(component => !family || component.family === family)
    .map(component => {
      const moduleIds = dedupeStrings(component.modules);
      const modules = moduleIds
        .map(moduleId => manifests.modulesById.get(moduleId))
        .filter(Boolean);
      const targets = intersectTargets(modules);

      return {
        id: component.id,
        family: component.family,
        description: component.description,
        moduleIds,

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Compare the supplied target against the list in the error message (case-sensitive, lowercase).
  2. Trim whitespace/newlines from env-derived target strings.
  3. Fix typos and casing.
  4. Upgrade the installer if the target is genuinely new.

Example fix

// before: listInstallComponents({ target: 'Cluade ' })
// after:  listInstallComponents({ target: 'claude' })
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = new Set(['claude','claude-project','cursor','antigravity','codex','gemini','opencode','codebuddy','joycode','qwen','zed','hermes','openclaw','kimi']);
function isSupportedTarget(t) { return t == null || SUPPORTED.has(t.trim()); }
// before listInstallComponents: assert isSupportedTarget(opts.target)

Type guard

function isSupportedInstallTarget(target) {
  return target == null || SUPPORTED.has(String(target).trim());
}

Try / catch

try {
  listInstallComponents({ target });
} catch (err) {
  if (err.message.startsWith('Unknown install target')) {
    // list valid targets, fix the typo, retry
  } else throw err;
}

Prevention

When it happens

Trigger: Calling listInstallComponents({ target: '...' }) with an id not in SUPPORTED_INSTALL_TARGETS — typo ('Cluade'), wrong case, removed target, or a forward reference to a target added in a newer installer.

Common situations: CLI --target typo; programmatic caller forwarding unvalidated user input; renamed target id; env-derived target string with trailing whitespace/newline; target removed in a cleanup but caller still references it.

Related errors


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