{"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":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/request.js","lineNumber":130,"sourceCode":"    ...(localeComponentId ? [localeComponentId] : []),\n  ]);\n  const excludeComponentIds = dedupeStrings([\n    ...(config?.excludeComponentIds || []),\n    ...(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 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":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install/request.js#L112-L148","documentation":"Thrown by normalizeInstallRequest() when the caller mixes legacy positional language arguments (e.g. `install python`) with manifest-mode selectors (--profile, --modules, --with, --without, or equivalent config-file selections). The two install modes are mutually exclusive to prevent ambiguous resolution.","triggerScenarios":"Running `npx ecc install python --profile full`, or having legacyLanguages in the config while also passing --modules, --with, or --without on the CLI.","commonSituations":"Migrating from the old language-based CLI to the new manifest/profile CLI and forgetting to remove the positional language; sharing a config file between team members who use different CLI styles.","solutions":["Pick one mode: either use legacy positional languages OR manifest selectors, not both.","Remove the positional language arguments when using --profile/--modules/--with/--without.","Remove the manifest selectors from your config file when using legacy languages."],"exampleFix":"# before\nnpx ecc install python --profile full\n# after (manifest mode)\nnpx ecc install --profile full\n# after (legacy mode)\nnpx ecc install python","handlingStrategy":"validation","validationCode":"function isManifestSelection(options) {\n  return Boolean(options?.profileId)\n    || (options?.moduleIds?.length ?? 0) > 0\n    || (options?.includeComponentIds?.length ?? 0) > 0\n    || (options?.excludeComponentIds?.length ?? 0) > 0;\n}\nfunction isLegacy(options) {\n  return (options?.legacyLanguages?.length ?? 0) > 0 || (options?.languages?.length ?? 0) > 0;\n}\nif (isManifestSelection(options) && isLegacy(options)) {\n  throw new Error('Choose either legacy languages OR manifest selectors, not both.');\n}","typeGuard":"function isLegacyMode(options) {\n  return (options?.languages?.length ?? 0) > 0 || (options?.legacyLanguages?.length ?? 0) > 0;\n}","tryCatchPattern":"try {\n  request = normalizeInstallRequest(options);\n} catch (e) {\n  if (/Legacy language arguments cannot be combined/.test(e.message)) {\n    const { languages, legacyLanguages, ...manifest } = options;\n    request = normalizeInstallRequest(manifest);\n  } else throw e;\n}","preventionTips":["Pick one install paradigm per project and document it for the team.","When migrating from legacy to manifest mode, remove the positional languages in the same commit.","Keep config files mode-pure: do not mix legacyLanguages with profile/module keys."],"tags":["cli","install","legacy","manifest","arguments"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}