{"record":{"id":"8665c69083cefcc6","repo":"affaan-m/ECC","slug":"unknown-install-target-target-expected-one-of-8665c6","errorCode":null,"errorMessage":"Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}","messagePattern":"Unknown install target: (.+?)\\. Expected one of (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":373,"sourceCode":"  const manifests = loadInstallManifests(options);\n  const normalizedModuleIds = dedupeStrings(moduleIds);\n  assertKnownModuleIds(normalizedModuleIds, manifests);\n  return normalizedModuleIds;\n}\n\nfunction listInstallComponents(options = {}) {\n  const manifests = loadInstallManifests(options);\n  const family = options.family || null;\n  const target = options.target || null;\n\n  if (family && !Object.hasOwn(COMPONENT_FAMILY_PREFIXES, family)) {\n    throw new Error(\n      `Unknown component family: ${family}. Expected one of ${Object.keys(COMPONENT_FAMILY_PREFIXES).join(', ')}`\n    );\n  }\n\n  if (target && !SUPPORTED_INSTALL_TARGETS.includes(target)) {\n    throw new Error(\n      `Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`\n    );\n  }\n\n  return manifests.components\n    .filter(component => !family || component.family === family)\n    .map(component => {\n      const moduleIds = dedupeStrings(component.modules);\n      const modules = moduleIds\n        .map(moduleId => manifests.modulesById.get(moduleId))\n        .filter(Boolean);\n      const targets = intersectTargets(modules);\n\n      return {\n        id: component.id,\n        family: component.family,\n        description: component.description,\n        moduleIds,","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L355-L391","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Compare the supplied target against the list in the error message (case-sensitive, lowercase).","Trim whitespace/newlines from env-derived target strings.","Fix typos and casing.","Upgrade the installer if the target is genuinely new."],"exampleFix":"// before: listInstallComponents({ target: 'Cluade ' })\n// after:  listInstallComponents({ target: 'claude' })","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['claude','claude-project','cursor','antigravity','codex','gemini','opencode','codebuddy','joycode','qwen','zed','hermes','openclaw','kimi']);\nfunction isSupportedTarget(t) { return t == null || SUPPORTED.has(t.trim()); }\n// before listInstallComponents: assert isSupportedTarget(opts.target)","typeGuard":"function isSupportedInstallTarget(target) {\n  return target == null || SUPPORTED.has(String(target).trim());\n}","tryCatchPattern":"try {\n  listInstallComponents({ target });\n} catch (err) {\n  if (err.message.startsWith('Unknown install target')) {\n    // list valid targets, fix the typo, retry\n  } else throw err;\n}","preventionTips":["Trim and lowercase target strings derived from env/CLI before forwarding.","Validate against SUPPORTED_INSTALL_TARGETS in the caller.","Surface the valid target list in --help output.","Re-validate after upgrading since the target list grows over time."],"tags":["manifest","validation","components","targets","api"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}