affaan-m/ECC · error · Error

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

Error message

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

What it means

After parsing all arguments, consult.js validates the --target value against SUPPORTED_INSTALL_TARGETS, which is ['claude', 'claude-project', 'cursor', 'antigravity', 'codex', 'gemini', 'opencode', 'codebuddy', 'joycode', 'qwen', 'zed', 'hermes', 'openclaw', 'kimi']. If the target is not in this list (including when left at the default 'claude' which is valid, or set to something unrecognized), the error lists all valid options. This is a post-parse validation, meaning a syntactically correct --target value that is semantically invalid still fails.

Source

Thrown at scripts/consult.js:232

        throw new Error('Missing value for --target');
      }
      parsed.target = args[index + 1];
      index += 1;
    } else if (arg === '--limit') {
      if (!args[index + 1]) {
        throw new Error('Missing value for --limit');
      }
      parsed.limit = Math.min(parsePositiveInteger(args[index + 1], '--limit'), MAX_LIMIT);
      index += 1;
    } else if (arg.startsWith('-')) {
      throw new Error(`Unknown argument: ${arg}`);
    } else {
      parsed.queryParts.push(arg);
    }
  }

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

  parsed.query = parsed.queryParts.join(' ').trim();
  return parsed;
}

function commandFor(kind, id, target) {
  if (kind === 'profile') {
    return `npx ecc-universal install --profile ${id} --target ${target}`;
  }

  return `npx ecc-universal install --profile minimal --target ${target} --with ${id}`;
}

function planCommandFor(componentId, target) {
  return `npx ecc-universal plan --profile minimal --target ${target} --with ${componentId}`;

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Use one of the exact supported targets listed in the error message
  2. Ensure exact case matching (all lowercase)
  3. If you need a new target, it must be added to SUPPORTED_INSTALL_TARGETS in scripts/lib/install-manifests.js

Example fix

// before
node scripts/consult.js --target vscode security
node scripts/consult.js --target Claude security
// after
node scripts/consult.js --target claude security
Defensive patterns

Strategy: validation

Validate before calling

// Validate the target before passing it to consult.js
const SUPPORTED = ['claude', 'claude-project', 'cursor', 'antigravity', 'codex', 'gemini', 'opencode', 'codebuddy', 'joycode', 'qwen', 'zed', 'hermes', 'openclaw', 'kimi'];
const target = process.env.CONSULT_TARGET || 'claude';
if (!SUPPORTED.includes(target)) {
  console.error(`Unknown install target: ${target}`);
  console.error(`Expected one of: ${SUPPORTED.join(', ')}`);
  process.exit(1);
}

Type guard

// Type guard for a supported install target
const SUPPORTED_TARGETS = ['claude', 'claude-project', 'cursor', 'antigravity', 'codex', 'gemini', 'opencode', 'codebuddy', 'joycode', 'qwen', 'zed', 'hermes', 'openclaw', 'kimi'];
function isSupportedTarget(value) {
  return typeof value === 'string' && SUPPORTED_TARGETS.includes(value);
}

Try / catch

try {
  const options = parseArgs(process.argv);
} catch (error) {
  if (error.message.startsWith('Unknown install target:')) {
    console.error(error.message);
    console.error('Use --target claude (default) or check the full list in the error message.');
    process.exit(2);
  }
  throw error;
}

Prevention

When it happens

Trigger: Passing --target vscode (not supported), --target Claude (case-sensitive, capital C fails), --target npm, or any other value not in the exact supported list. The default target 'claude' is always valid.

Common situations: Users assuming their IDE or harness name is supported when it uses a different identifier; case mismatch (Claude vs claude); using a new harness name not yet added to SUPPORTED_INSTALL_TARGETS; typos in the target name.

Related errors


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