{"record":{"id":"9cbe4515a5c0694b","repo":"affaan-m/ECC","slug":"unknown-legacy-languages-unknownlegacylanguages","errorCode":null,"errorMessage":"Unknown legacy languages: ${unknownLegacyLanguages.join(', ')}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}","messagePattern":"Unknown legacy languages: (.+?)\\. Expected one of (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":496,"sourceCode":"  const legacyLanguages = dedupeStrings(options.legacyLanguages)\n    .map(language => language.toLowerCase());\n  const normalizedLegacyLanguages = dedupeStrings(legacyLanguages);\n\n  if (normalizedLegacyLanguages.length === 0) {\n    throw new Error('No legacy languages were provided');\n  }\n\n  const unknownLegacyLanguages = normalizedLegacyLanguages\n    .filter(language => !Object.hasOwn(LEGACY_LANGUAGE_ALIAS_TO_CANONICAL, language));\n\n  if (unknownLegacyLanguages.length === 1) {\n    throw new Error(\n      `Unknown legacy language: ${unknownLegacyLanguages[0]}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}`\n    );\n  }\n\n  if (unknownLegacyLanguages.length > 1) {\n    throw new Error(\n      `Unknown legacy languages: ${unknownLegacyLanguages.join(', ')}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}`\n    );\n  }\n\n  const canonicalLegacyLanguages = normalizedLegacyLanguages\n    .map(language => LEGACY_LANGUAGE_ALIAS_TO_CANONICAL[language]);\n  const baseModuleIds = LEGACY_COMPAT_BASE_MODULE_IDS_BY_TARGET[target || 'claude']\n    || LEGACY_COMPAT_BASE_MODULE_IDS_BY_TARGET.claude;\n  const moduleIds = dedupeStrings([\n    ...baseModuleIds,\n    ...(target === 'antigravity'\n      ? []\n      : canonicalLegacyLanguages.flatMap(language => LEGACY_LANGUAGE_EXTRA_MODULE_IDS[language] || [])),\n  ]);\n\n  assertKnownModuleIds(moduleIds, manifests);\n\n  return {","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L478-L514","documentation":"Same check as error 185 but for the multi-unknown case. When unknownLegacyLanguages.length > 1 the library switches to a comma-joined message so the caller sees every bad value at once instead of fixing them one at a time.","triggerScenarios":"Passing legacyLanguages: ['scala', 'haskell', 'elixir'] — none of these are keys in LEGACY_LANGUAGE_ALIAS_TO_CANONICAL.","commonSituations":"Project detector returns a list of languages from package.json / Cargo.toml / mix.exs and forwards all of them; a polyglot repo includes languages ECC has no rules for; bulk migration script.","solutions":["Filter the list against listLegacyCompatibilityLanguages() before calling.","Use the alias map for variants (e.g. 'ts' is NOT an alias — use 'typescript').","Keep only the languages you actually want rules for; do not forward every detected language.","If the entire list is unsupported, fall back to resolveInstallPlan() with no legacy languages."],"exampleFix":"// before\nresolveLegacyCompatibilitySelection({ legacyLanguages: detected });\n// after\nconst supported = new Set(require('./scripts/lib/install-manifests').listLegacyCompatibilityLanguages());\nconst legacyLanguages = detected.filter(l => supported.has(String(l || '').toLowerCase()));\nif (legacyLanguages.length === 0) return resolveInstallPlan({ target });\nresolveLegacyCompatibilitySelection({ target, legacyLanguages });","handlingStrategy":"validation","validationCode":"const { listLegacyCompatibilityLanguages } = require('./scripts/lib/install-manifests');\nconst supported = new Set(listLegacyCompatibilityLanguages());\nconst clean = options.legacyLanguages\n  .map(l => String(l || '').toLowerCase())\n  .filter(l => supported.has(l));\nif (clean.length === 0) return resolveInstallPlan({ target: options.target });\nresolveLegacyCompatibilitySelection({ ...options, legacyLanguages: clean });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Forward only the languages you actually want rules for — not every detected language.","Surface listLegacyCompatibilityLanguages() output to the end user so they pick from valid values."],"tags":["install","validation","legacy","language","bulk"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}