{"record":{"id":"9f1354f9b01a6c97","repo":"affaan-m/ECC","slug":"target-target-is-supported-but-the-bare-lang","errorCode":null,"errorMessage":"Target '${target}' is supported, but the bare-language install syntax only accepts ${LEGACY_INSTALL_TARGETS.join(', ')}. Install '${target}' with a component selection instead, e.g. `install.sh --target ${target} --profile full` (or --modules <id,...> / --skills <id,...>).","messagePattern":"Target '(.+?)' is supported, but the bare-language install syntax only accepts (.+?)\\. Install '(.+?)' with a component selection instead, e\\.g\\. `install\\.sh --target (.+?) --profile full` \\(or --modules <id,\\.\\.\\.> / --skills <id,\\.\\.\\.>\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-executor.js","lineNumber":74,"sourceCode":"    .readdirSync(dirPath, { withFileTypes: true })\n    .filter(entry => entry.isDirectory())\n    .map(entry => entry.name)\n    .sort();\n}\n\nfunction listAvailableLanguages(sourceRoot = getSourceRoot()) {\n  return [...new Set([...listLegacyCompatibilityLanguages(), ...readDirectoryNames(path.join(sourceRoot, 'rules')).filter(name => name !== 'common')])].sort();\n}\n\nfunction validateLegacyTarget(target) {\n  if (LEGACY_INSTALL_TARGETS.includes(target)) {\n    return;\n  }\n  // A target can be fully supported yet not installable via the bare-language\n  // positional syntax (which is legacy-only). Guide the user to the right mode\n  // instead of implying the target is unknown (#2282).\n  if (SUPPORTED_INSTALL_TARGETS.includes(target)) {\n    throw new Error(\n      `Target '${target}' is supported, but the bare-language install syntax only accepts ${LEGACY_INSTALL_TARGETS.join(', ')}. ` +\n        `Install '${target}' with a component selection instead, e.g. \\`install.sh --target ${target} --profile full\\` ` +\n        `(or --modules <id,...> / --skills <id,...>).`\n    );\n  }\n  throw new Error(`Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`);\n}\n\nconst IGNORED_DIRECTORY_NAMES = new Set(['node_modules', '.git']);\n\nfunction listFilesRecursive(dirPath) {\n  if (!fs.existsSync(dirPath)) {\n    return [];\n  }\n\n  const files = [];\n  const entries = fs.readdirSync(dirPath, { withFileTypes: true });\n","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-executor.js#L56-L92","documentation":"Thrown by validateLegacyTarget() in scripts/lib/install-executor.js when the requested target IS in SUPPORTED_INSTALL_TARGETS but is NOT in the small LEGACY_INSTALL_TARGETS set (claude, claude-project, cursor, antigravity). The bare-language positional install syntax only accepts the legacy set; newer targets require an explicit --target plus component selection.","triggerScenarios":"validateLegacyTarget('codex'), validateLegacyTarget('gemini'), validateLegacyTarget('opencode'), etc. — i.e. user invokes the legacy positional install path: install.sh codex (instead of install.sh --target codex).","commonSituations":"User follows an old blog post showing ./install.sh <language>; user types a bare target name expecting it to work for all harnesses; CI script invokes the legacy positional form for a newer harness.","solutions":["Switch to the explicit target + component syntax: install.sh --target <id> --profile full.","Or select modules/skills explicitly: install.sh --target <id> --modules <id,...> or --skills <id,...>.","If you actually want one of the legacy targets (claude, claude-project, cursor, antigravity), pass it as-is via the positional form."],"exampleFix":"# before\n./install.sh codex\n\n# after\n./install.sh --target codex --profile full\n# or\n./install.sh --target codex --skills python-patterns","handlingStrategy":"validation","validationCode":"const { LEGACY_INSTALL_TARGETS, SUPPORTED_INSTALL_TARGETS } = {\n  LEGACY_INSTALL_TARGETS: ['claude', 'claude-project', 'cursor', 'antigravity'],\n  SUPPORTED_INSTALL_TARGETS: ['claude','claude-project','cursor','antigravity','codex','gemini','opencode','codebuddy','joycode','qwen','zed','hermes','openclaw','kimi'],\n};\nfunction isLegacyBareTarget(t) { return LEGACY_INSTALL_TARGETS.includes(t); }\nfunction needsExplicitTargetSyntax(t) {\n  return SUPPORTED_INSTALL_TARGETS.includes(t) && !LEGACY_INSTALL_TARGETS.includes(t);\n}","typeGuard":null,"tryCatchPattern":"try {\n  validateLegacyTarget(target);\n} catch (err) {\n  if (/bare-language install syntax/.test(err.message)) {\n    // re-dispatch through the explicit target path\n    return runInstall({ target, profile: 'full' });\n  }\n  throw err;\n}","preventionTips":["Prefer the --target syntax for all installs; reserve the positional form for legacy scripts.","Update docs and onboarding to use install.sh --target <id> --profile full.","In CI, lint the install command and reject bare new-target usage."],"tags":["install","harness","validation","cli"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}