n8n-io/n8n · error · Error
Missing value for --test-case-path
Error message
Missing value for --test-case-path
What it means
Thrown by `parseCliArgs()` in export-latest-verifier-request.ts when `--test-case-path` is the last token (the `argv[++i]` lookup returned undefined). `--test-case-path` takes an explicit filesystem path (resolved via `path.resolve(process.cwd(), rawPath)`) — unlike `--slug` which joins to a known data dir. Use this when the case file lives outside `evaluations/data/workflows/`.
Source
Thrown at packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts:101
for (let i = 0; i < argv.length; i++) {
const arg = argv[i];
switch (arg) {
case '--test-case':
case '--slug': {
const slug = argv[++i];
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',View on GitHub (pinned to 5ac6606e81)
Solutions
- Supply the path: `--test-case-path /abs/path/to/case.json` (or a path relative to cwd).
- If the file is in the standard workflows dir, prefer `--slug <name>` instead.
- Confirm the file exists at the resolved path before re-running.
Example fix
// before $ node export-latest-verifier-request.ts --test-case-path // after $ node export-latest-verifier-request.ts --test-case-path /tmp/my-case.json
Defensive patterns
Strategy: validation
Validate before calling
// Reuse the same checkMissingValues helper from error 436 — it already covers --test-case-path.
const missing = checkMissingValues(process.argv.slice(2));
if (missing.length) throw new Error(`Missing values for: ${missing.join(', ')}`); Prevention
- Confirm the case file exists at the resolved path before invoking.
- Prefer `--slug` when the case lives in the standard workflows dir; reserve `--test-case-path` for scratch/external files.
When it happens
Trigger: `--test-case-path` as the last token. A shell-interpolated `${PATH_TO_CASE}` that resolved to empty (note: env var named like PATH can shadow — pick a clearer name). The flag was included by a script template that didn't fill in the value.
Common situations: Pointing at a case file under development in a scratch directory. CI passing an absolute path that wasn't substituted in.
Related errors
- Missing value for ${arg}
- Missing value for --scenario
- 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/997444e10cbecd38.
Report an issue: GitHub.