{"record":{"id":"373e73801b6ccf70","repo":"affaan-m/ECC","slug":"missing-value-for-locale","errorCode":null,"errorMessage":"Missing value for --locale","messagePattern":"Missing value for --locale","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/request.js","lineNumber":67,"sourceCode":"    } else if (arg === '--with') {\n      const componentId = args[index + 1] || '';\n      if (componentId.trim()) {\n        parsed.includeComponentIds.push(componentId.trim());\n      }\n      index += 1;\n    } else if (arg === '--skill' || arg === '--skills') {\n      parsed.includeComponentIds.push(...normalizeSkillComponentIds(args[index + 1] || ''));\n      index += 1;\n    } else if (arg === '--without') {\n      const componentId = args[index + 1] || '';\n      if (componentId.trim()) {\n        parsed.excludeComponentIds.push(componentId.trim());\n      }\n      index += 1;\n    } else if (arg === '--locale') {\n      const locale = args[index + 1] || '';\n      if (!locale || locale.startsWith('--')) {\n        throw new Error('Missing value for --locale');\n      }\n      parsed.locale = locale;\n      index += 1;\n    } else if (arg === '--dry-run') {\n      parsed.dryRun = true;\n    } else if (arg === '--json') {\n      parsed.json = true;\n    } else if (arg === '--help' || arg === '-h') {\n      parsed.help = true;\n    } else if (arg.startsWith('--')) {\n      throw new Error(`Unknown argument: ${arg}`);\n    } else {\n      parsed.languages.push(arg);\n    }\n  }\n\n  return parsed;\n}","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install/request.js#L49-L85","documentation":"Thrown by the install CLI argument parser when --locale is the last token on the command line or is immediately followed by another flag (a token starting with --). The parser expects --locale to consume the next argv slot as the locale value.","triggerScenarios":"Invoking `npx ecc install --locale` with no following argument, or `--locale --target claude` where the next token is itself a flag.","commonSituations":"Typos; copy-pasting a partial command; shell-quoting bugs that drop the locale value; scripts that conditionally append --locale but forget the value.","solutions":["Supply a supported locale value immediately after --locale, e.g. `--locale zh-CN`.","If locale was unintended, remove the --locale flag entirely.","Quote the value if it contains special characters (none of the supported locales do, so this usually indicates a different bug)."],"exampleFix":"# before\nnpx ecc install --locale\n# after\nnpx ecc install --locale zh-CN --target claude","handlingStrategy":"validation","validationCode":"function hasLocaleValue(argv) {\n  const i = argv.indexOf('--locale');\n  if (i === -1) return true;\n  const next = argv[i + 1];\n  return Boolean(next) && !next.startsWith('--');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const request = normalizeInstallRequest(parseInstallArgs(argv));\n} catch (e) {\n  if (/Missing value for --locale/.test(e.message)) {\n    console.error('Usage: ecc install --locale <locale> ...');\n    process.exit(2);\n  }\n  throw e;\n}","preventionTips":["Validate flag/value pairs before invoking the parser when building commands programmatically.","Prefer config-file locale over the CLI flag to avoid shell-quoting pitfalls.","Print --help output when the parser rejects arguments so users can self-correct."],"tags":["cli","arguments","locale","install"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}