n8n-io/n8n · error · Error
Missing value for --scenario
Error message
Missing value for --scenario
What it means
Thrown by `parseCliArgs()` in export-latest-verifier-request.ts when `--scenario` is the last token (the `argv[++i]` lookup returned undefined). `--scenario` selects which scenario within the test case to export; a test case may declare multiple scenarios and the exporter needs to know which one. There's also a positional fallback: the first bare token becomes the scenario name, so `--scenario` is only needed when you also want to pass a slug/flag-style second positional.
Source
Thrown at packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts:107
if (!slug) throw new Error(`Missing value for ${arg}`);
testCasePath = path.join(
instanceAiRoot,
'evaluations',
'data',
'workflows',
`${slug}.json`,
);
break;
}
case '--test-case-path': {
const rawPath = argv[++i];
if (!rawPath) throw new Error('Missing value for --test-case-path');
testCasePath = path.resolve(process.cwd(), rawPath);
break;
}
case '--scenario': {
scenarioName = argv[++i];
if (!scenarioName) throw new Error('Missing value for --scenario');
break;
}
default:
if (arg.startsWith('--')) throw new Error(`Unknown flag: ${arg}`);
if (!scenarioName) {
scenarioName = arg;
} else if (!testCasePath) {
testCasePath = path.join(
instanceAiRoot,
'evaluations',
'data',
'workflows',
`${arg}.json`,
);
} else {
throw new Error(`Unexpected positional argument: ${arg}`);
}
}View on GitHub (pinned to 5ac6606e81)
Solutions
- Supply the scenario name: `--scenario "cross-team report"`.
- Alternatively use the positional form: `node export-latest-verifier-request.ts <slug> <scenario-name>` (first positional is slug, second is scenario).
- If you don't need a specific scenario, drop `--scenario` entirely (the exporter will use the default).
Example fix
// before $ node export-latest-verifier-request.ts --slug my-case --scenario // after $ node export-latest-verifier-request.ts --slug my-case --scenario "cross-team report"
Defensive patterns
Strategy: validation
Validate before calling
// Covered by the same checkMissingValues helper. // For scenario specifically, you can also fall back to the second positional: // node export.ts <slug> <scenario>
Prevention
- Use the positional `<slug> <scenario>` form to avoid value-flag pitfalls.
- In CI matrices iterating scenario names, skip iterations where the name is empty rather than emitting a dangling flag.
When it happens
Trigger: `--scenario` as the last token. A script template that conditionally adds `--scenario` but didn't substitute the name. The user intended to pass the scenario name but pressed enter early.
Common situations: Running the exporter for a specific scenario in a multi-scenario case. CI matrix that iterates over scenario names and one iteration came up empty.
Related errors
- Missing value for ${arg}
- Missing value for --test-case-path
- Unknown flag: ${arg}
- Unknown flag: ${arg.split('=', 1)[0]}
- Unexpected positional argument
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/bc1c5fa89b39acba.
Report an issue: GitHub.