{"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":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":393,"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":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-manifests.js#L375-L411","documentation":"listInstallComponents() validates the optional options.target against SUPPORTED_INSTALL_TARGETS before filtering. If the target string is not in that list, the library throws instead of returning an empty result set, to surface misconfiguration early.","triggerScenarios":"Calling listInstallComponents({ target: 'cursor' }) (or any target not in SUPPORTED_INSTALL_TARGETS) — e.g. a misspelled target, a target from another tool, or one removed in a newer version.","commonSituations":"Passing a harness name the plugin does not install to, copying target values from another tool's config, or stale docs listing a removed install target.","solutions":["Use one of the targets listed in the error message / SUPPORTED_INSTALL_TARGETS exactly","Fix casing/typo in the target value","Omit the target option to list components across all targets, then inspect valid targets from the manifests","Validate user-supplied targets against SUPPORTED_INSTALL_TARGETS before calling"],"exampleFix":"// before\nlistInstallComponents({ target: 'vscode' });\n// after\nlistInstallComponents({ target: 'claude' });","handlingStrategy":"validation","validationCode":"const { SUPPORTED_INSTALL_TARGETS } = require('./scripts/lib/install-manifests');\nif (target != null && !SUPPORTED_INSTALL_TARGETS.includes(target)) {\n  throw new Error(`Invalid install target '${target}'. Valid: ${SUPPORTED_INSTALL_TARGETS.join(', ')}`);\n}","typeGuard":"const isValidTarget = (t) => typeof t === 'string' && SUPPORTED_INSTALL_TARGETS.includes(t);","tryCatchPattern":"try {\n  const comps = listInstallComponents({ target });\n} catch (err) {\n  if (err.message.startsWith('Unknown install target')) {\n    console.error(err.message);\n    process.exitCode = 1;\n  } else throw err;\n}","preventionTips":["Read the allowed targets from SUPPORTED_INSTALL_TARGETS rather than hardcoding","Trim and normalize target strings from CLI flags/config","Don't copy target names from other tools' docs","Verify target names against the current version's docs after upgrades"],"tags":["validation","invalid-argument","install-manifests"],"backgroundTag":"invalid-enum-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}