{"record":{"id":"f16941ffaba1ba64","repo":"affaan-m/ECC","slug":"legacy-language-arguments-cannot-be-combined-with","errorCode":null,"errorMessage":"Legacy language arguments cannot be combined with --profile, --modules, --with, --without, or manifest config selections","messagePattern":"Legacy language arguments cannot be combined with --profile, --modules, --with, --without, or manifest config selections","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install/request.js","lineNumber":141,"sourceCode":"    ...(options.excludeComponentIds || []),\n  ]);\n  const legacyLanguages = dedupeStrings(dedupeStrings([\n    ...(Array.isArray(options.legacyLanguages) ? options.legacyLanguages : []),\n    ...(Array.isArray(options.languages) ? options.languages : []),\n  ]).map(language => language.toLowerCase()));\n  const hookConsent = resolveHookConsentFlags(options);\n  if (hookConsent === 'declined' && moduleIds.includes('hooks-runtime')) {\n    throw new Error('--no-hooks cannot be combined with an explicit hooks-runtime module selection');\n  }\n  const hasManifestBaseSelection = Boolean(profileId) || moduleIds.length > 0 || includeComponentIds.length > 0;\n  const hasNonLocaleManifestSelection = Boolean(profileId)\n    || moduleIds.length > 0\n    || requestedIncludeComponentIds.length > 0\n    || excludeComponentIds.length > 0;\n  const usingManifestMode = hasManifestBaseSelection || excludeComponentIds.length > 0;\n\n  if (hasNonLocaleManifestSelection && legacyLanguages.length > 0) {\n    throw new Error(\n      'Legacy language arguments cannot be combined with --profile, --modules, --with, --without, or manifest config selections'\n    );\n  }\n\n  if (!options.help && !hasManifestBaseSelection && legacyLanguages.length === 0) {\n    throw new Error('No install profile, module IDs, included components, or legacy languages were provided');\n  }\n\n  return {\n    mode: legacyLanguages.length > 0\n      ? 'legacy-compat'\n      : (usingManifestMode ? 'manifest' : 'legacy-compat'),\n    target,\n    profileId,\n    moduleIds,\n    includeComponentIds,\n    excludeComponentIds,\n    legacyLanguages,","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install/request.js#L123-L159","documentation":"normalizeInstallRequest validates that legacy language arguments (e.g. old --lang style flags) are not mixed with the newer manifest-based selection flags. The install CLI supports two mutually exclusive selection modes: legacy language packs and manifest selections (--profile, --modules, --with, --without, or manifest config entries). Combining them is ambiguous, so the library rejects the request up front.","triggerScenarios":"Calling normalizeInstallRequest (directly or via request()) where legacyLanguages.length > 0 AND hasNonLocaleManifestSelection is true, i.e. language arguments were supplied together with a profile, module IDs, included component IDs, or exclusion IDs.","commonSituations":"Users upgrading from the legacy install syntax run an old command line like `install --lang typescript --profile standard`; shell aliases or wrapper scripts that append language flags to a modern command; documentation examples mixing both flag generations.","solutions":["Remove the legacy language arguments and rely solely on --profile/--modules/--with/--without.","Remove the modern manifest flags and use only legacy language arguments if you intentionally want legacy-compat mode.","Update any wrapper scripts or aliases that still inject language flags.","Pass no selection flags at all only if you also intend the 'no selections' error path — you must supply exactly one selection mode."],"exampleFix":"// before\nnode install.js --lang typescript --profile standard\n// after\nnode install.js --profile standard --modules typescript-modules","handlingStrategy":"validation","validationCode":"const hasLegacy = (opts.languages || []).length > 0\nconst hasManifest = !!(opts.profile || (opts.modules && opts.modules.length) || (opts.with && opts.with.length) || (opts.without && opts.without.length))\nif (hasLegacy && hasManifest) throw new Error('Use either legacy language args or manifest selections, not both')","typeGuard":"function isExclusiveSelection(opts) {\n  const legacy = Array.isArray(opts.languages) && opts.languages.length > 0\n  const manifest = Boolean(opts.profile) || (Array.isArray(opts.modules) && opts.modules.length > 0) || (Array.isArray(opts.with) && opts.with.length > 0) || (Array.isArray(opts.without) && opts.without.length > 0)\n  return !(legacy && manifest)\n}","tryCatchPattern":"try {\n  const req = normalizeInstallRequest(options)\n} catch (err) {\n  if (err.message.includes('Legacy language arguments')) {\n    console.error('Pick one selection mode: legacy languages OR --profile/--modules/--with/--without')\n  } else throw err\n}","preventionTips":["Pick one selection mode per install command; never mix flag generations.","Audit shell aliases/wrappers that append legacy language flags.","Prefer modern --profile/--modules flags in new scripts.","Read --help output to confirm current flag names."],"tags":["cli","install","validation","conflicting-options"],"backgroundTag":"mutually-exclusive-flags","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"}