{"record":{"id":"a20de917db74a108","repo":"affaan-m/ECC","slug":"unknown-component-family-family-expected-one","errorCode":null,"errorMessage":"Unknown component family: ${family}. Expected one of ${Object.keys(COMPONENT_FAMILY_PREFIXES).join(', ')}","messagePattern":"Unknown component family: (.+?)\\. Expected one of (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":367,"sourceCode":"\nfunction listLegacyCompatibilityLanguages() {\n  return Object.keys(LEGACY_LANGUAGE_ALIAS_TO_CANONICAL).sort();\n}\n\nfunction validateInstallModuleIds(moduleIds, options = {}) {\n  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);","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L349-L385","documentation":"listInstallComponents accepts an optional `family` filter. If provided, it must be one of the keys in COMPONENT_FAMILY_PREFIXES (baseline, language, framework, capability, agent, skill, locale). Any other value is rejected up front with the valid set listed.","triggerScenarios":"Calling listInstallComponents({ family: '...' }) with an unknown family — typo ('Skils'), wrong category ('themes'), or a forward reference to a family added in a newer version. Triggered before any component filtering runs.","commonSituations":"CLI flag typo (--family themse); programmatic caller hard-coded an outdated family name; user guessed a family not in the catalog; manifest added a new family but the running installer predates it.","solutions":["Compare the supplied family against the list in the error message (baseline, language, framework, capability, agent, skill, locale).","Fix the typo / casing.","If you genuinely need a new family, upgrade the installer so COMPONENT_FAMILY_PREFIXES includes it.","Drop the family filter to list components across all families."],"exampleFix":"// before: listInstallComponents({ family: 'skils' })\n// after:  listInstallComponents({ family: 'skill' })","handlingStrategy":"validation","validationCode":"const KNOWN_FAMILIES = new Set(['baseline','language','framework','capability','agent','skill','locale']);\nfunction isKnownFamily(f) { return f == null || KNOWN_FAMILIES.has(f); }\n// before listInstallComponents: assert isKnownFamily(opts.family)","typeGuard":"function isSupportedComponentFamily(family) {\n  return family == null || KNOWN_FAMILIES.has(family);\n}","tryCatchPattern":"try {\n  listInstallComponents({ family });\n} catch (err) {\n  if (err.message.startsWith('Unknown component family')) {\n    // fall back to listing all families, or fix the typo\n  } else throw err;\n}","preventionTips":["Forward only validated family strings from CLI input.","Document the valid family set next to the --family flag.","Add a unit test that rejects each invalid family in the error message.","Re-validate after upgrading since the family set may grow."],"tags":["manifest","validation","components","api"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}