{"record":{"id":"295ead724ebf99d5","repo":"affaan-m/ECC","slug":"locale-can-only-be-used-with-target-claude-or","errorCode":null,"errorMessage":"--locale can only be used with --target claude or --target claude-project","messagePattern":"--locale can only be used with --target claude or --target claude-project","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/request.js","lineNumber":104,"sourceCode":"\nfunction normalizeInstallRequest(options = {}) {\n  const config = options.config && typeof options.config === 'object'\n    ? options.config\n    : null;\n  const profileId = options.profileId || config?.profileId || null;\n  const target = options.target || config?.target || 'claude';\n  const moduleIds = validateInstallModuleIds(\n    dedupeStrings([...(config?.moduleIds || []), ...(options.moduleIds || [])])\n  );\n  const locale = options.locale || config?.locale || null;\n  const localeComponentId = locale ? LOCALE_ALIAS_TO_COMPONENT_ID[locale] : null;\n  if (locale && !localeComponentId) {\n    throw new Error(\n      `Unsupported locale: \"${locale}\". Supported locales: ${listSupportedLocales().join(', ')}`\n    );\n  }\n  if (locale && target !== 'claude' && target !== 'claude-project') {\n    throw new Error('--locale can only be used with --target claude or --target claude-project');\n  }\n  const requestedIncludeComponentIds = dedupeStrings([\n    ...(config?.includeComponentIds || []),\n    ...(options.includeComponentIds || []),\n  ]);\n  const includeComponentIds = dedupeStrings([\n    ...requestedIncludeComponentIds,\n    ...(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;","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install/request.js#L86-L122","documentation":"Thrown by normalizeInstallRequest() when --locale is supplied together with a target other than 'claude' or 'claude-project'. Translation bundles are only wired into the Claude harness targets; cursor and antigravity targets have no locale installation path.","triggerScenarios":"Combining `--target cursor` or `--target antigravity` with `--locale zh-CN`.","commonSituations":"Reusing a Claude-targeted install command for Cursor; assuming locale applies to every harness.","solutions":["Drop --locale when targeting cursor or antigravity.","Switch the target to claude or claude-project if you need the translation bundle.","Run two separate installs: one Claude-targeted with --locale, one Cursor-targeted without."],"exampleFix":"# before\nnpx ecc install --target cursor --locale zh-CN\n# after\nnpx ecc install --target cursor","handlingStrategy":"validation","validationCode":"function localeTargetCompatible(target, locale) {\n  if (!locale) return true;\n  return target === 'claude' || target === 'claude-project';\n}\n// guard:\nif (!localeTargetCompatible(options.target || 'claude', options.locale)) {\n  throw new Error('--locale requires --target claude or --target claude-project');\n}","typeGuard":"function supportsLocale(target) {\n  return target === 'claude' || target === 'claude-project';\n}","tryCatchPattern":"try {\n  request = normalizeInstallRequest(options);\n} catch (e) {\n  if (/--locale can only be used with/.test(e.message)) {\n    const { locale, ...rest } = options;\n    request = normalizeInstallRequest(rest); // drop locale and retry\n  } else throw e;\n}","preventionTips":["Gate --locale in your wrapper on the target value before assembling the command.","Document the locale/target matrix for users mixing harnesses.","When looping over multiple targets, conditionally include --locale only for Claude targets."],"tags":["cli","locale","target","install"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}