{"record":{"id":"650bc6d98cbcfe5f","repo":"remix-run/remix","slug":"config-requires-a-value","errorCode":null,"errorMessage":"--config requires a value.","messagePattern":"--config requires a value\\.","errorType":"exception","errorClass":"UsageError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/cli.ts","lineNumber":167,"sourceCode":"  let noColor = false\n\n  for (let index = 0; index < argv.length; index++) {\n    let arg = argv[index]!\n\n    if (arg === '--') {\n      filteredArgv.push(...argv.slice(index))\n      break\n    }\n\n    if (arg === '--no-color') {\n      noColor = true\n      continue\n    }\n\n    if (arg === '--config') {\n      let value = argv[index + 1]\n      if (value == null || value.length === 0 || value.startsWith('-')) {\n        throw missingOptionValue('--config')\n      }\n      configPath = value\n      index++\n      continue\n    }\n\n    if (arg.startsWith('--config=')) {\n      let value = arg.slice('--config='.length)\n      if (value.length === 0) {\n        throw missingOptionValue('--config')\n      }\n      configPath = value\n      continue\n    }\n\n    filteredArgv.push(arg)\n  }\n","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/cli.ts#L149-L185","documentation":"The global CLI option parser requires a value after a space-separated --config flag. The next argv entry is missing, empty, or looks like another flag (starts with '-'), so the config path is rejected.","triggerScenarios":"Running remix --config with nothing after it, or followed immediately by another flag, e.g. 'remix --config --verbose' or a trailing 'remix dev --config' at end of argv.","commonSituations":"Shell scripts or CI pipelines concatenating flags where the config path variable is empty; users assuming --config is a boolean flag; copy-paste errors from docs.","solutions":["Provide a value: remix --config remix.config.json dev","Use the equals form: --config=remix.config.json","Check shell scripts for unquoted/empty variables passed as the config path"],"exampleFix":"# before\n$ remix --config   # missing value\n\n# after\n$ remix --config remix.config.json dev","handlingStrategy":"validation","validationCode":"function configFlagHasValue(argv: string[]): boolean {\n  let i = argv.indexOf('--config')\n  if (i === -1) return true\n  let v = argv[i + 1]\n  return v != null && v.length > 0 && !v.startsWith('-')\n}","typeGuard":null,"tryCatchPattern":"try {\n  runCli(argv)\n} catch (error) {\n  if (/--config requires a value/.test(error.message)) printUsage()\n  else throw error\n}","preventionTips":["Use --config=path form in scripts to make the pairing explicit","Guard empty variables: ${CONFIG:-remix.config.json} in shell scripts","Add a wrapper that validates required-value flags before exec"],"tags":["cli","arguments","config"],"backgroundTag":"missing-cli-option-value","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}