remix-run/remix · error · UsageError
RMX_MISSING_OPTION_VALUE
RMX_MISSING_OPTION_VALUE
Error message
${option} requires a value. What it means
Thrown when a value-taking option is passed with `=` but the inline value is empty, e.g. `--port=`. The parser detects the option needs a value but the provided inline value has zero length, so it rejects it instead of storing an empty string.
Source
Thrown at packages/cli/src/lib/parse-args.ts:69
let arg = argv[index]!
let equalsIndex = arg.indexOf('=')
let flag = equalsIndex === -1 ? arg : arg.slice(0, equalsIndex)
let inlineValue = equalsIndex === -1 ? undefined : arg.slice(equalsIndex + 1)
let resolved = specsByFlag.get(flag)
if (resolved != null) {
if (resolved.spec.type === 'boolean') {
if (inlineValue !== undefined) {
throw unknownArgument(arg)
}
values[resolved.key] = true as ParsedArgsValues<definitions>[typeof resolved.key]
continue
}
if (inlineValue !== undefined) {
if (inlineValue.length === 0) {
throw missingOptionValue(flag)
}
values[resolved.key] = inlineValue as ParsedArgsValues<definitions>[typeof resolved.key]
continue
}
let next = argv[index + 1]
if (next == null || next.length === 0 || next.startsWith('-')) {
throw missingOptionValue(flag)
}
values[resolved.key] = next as ParsedArgsValues<definitions>[typeof resolved.key]
index += 1
continue
}
if (arg.startsWith('-')) {
throw unknownArgument(arg)View on GitHub (pinned to 9696913134)
Solutions
- Provide a value after `=`, e.g. `--port=3000`
- Or use space-separated form: `--port 3000`
Example fix
# before remix dev --port= # after remix dev --port=3000
Defensive patterns
Strategy: validation
Validate before calling
const args = process.argv.slice(2)
const bad = args.find((a) => a.startsWith('--') && a.endsWith('='))
if (bad) throw new Error(`Empty value for ${bad}`) Type guard
const hasEmptyInlineValue = (arg: string): boolean => arg.startsWith('--') && arg.length > 2 && arg.endsWith('=') Prevention
- Validate shell-built commands in scripts before spawning the CLI
When it happens
Trigger: Passing `--option=` (nothing after the equals sign) for an option registered with a value type in the argument spec.
Common situations: Shell completion or scripts accidentally appending `=` without a value; copy-pasting a command where the value was dropped.
Related errors
- RMX_UNEXPECTED_ARGUMENT
- --config requires a value.
- Unknown command: assets ${command}
- `remix assets inspect` requires a URL or file path.
- Unknown command: db ${command}
AI-assisted analysis of remix-run/remix@9696913134 (2026-08-27).
Data as JSON: /api/errors/73823a1ce2631777.
Report an issue: GitHub.