{"record":{"id":"997444e10cbecd38","repo":"n8n-io/n8n","slug":"missing-value-for-test-case-path","errorCode":null,"errorMessage":"Missing value for --test-case-path","messagePattern":"Missing value for --test-case-path","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts","lineNumber":101,"sourceCode":"\tfor (let i = 0; i < argv.length; i++) {\n\t\tconst arg = argv[i];\n\t\tswitch (arg) {\n\t\t\tcase '--test-case':\n\t\t\tcase '--slug': {\n\t\t\t\tconst slug = argv[++i];\n\t\t\t\tif (!slug) throw new Error(`Missing value for ${arg}`);\n\t\t\t\ttestCasePath = path.join(\n\t\t\t\t\tinstanceAiRoot,\n\t\t\t\t\t'evaluations',\n\t\t\t\t\t'data',\n\t\t\t\t\t'workflows',\n\t\t\t\t\t`${slug}.json`,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase '--test-case-path': {\n\t\t\t\tconst rawPath = argv[++i];\n\t\t\t\tif (!rawPath) throw new Error('Missing value for --test-case-path');\n\t\t\t\ttestCasePath = path.resolve(process.cwd(), rawPath);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase '--scenario': {\n\t\t\t\tscenarioName = argv[++i];\n\t\t\t\tif (!scenarioName) throw new Error('Missing value for --scenario');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tif (arg.startsWith('--')) throw new Error(`Unknown flag: ${arg}`);\n\t\t\t\tif (!scenarioName) {\n\t\t\t\t\tscenarioName = arg;\n\t\t\t\t} else if (!testCasePath) {\n\t\t\t\t\ttestCasePath = path.join(\n\t\t\t\t\t\tinstanceAiRoot,\n\t\t\t\t\t\t'evaluations',\n\t\t\t\t\t\t'data',\n\t\t\t\t\t\t'workflows',","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts#L83-L119","documentation":"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/`.","triggerScenarios":"`--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.","commonSituations":"Pointing at a case file under development in a scratch directory. CI passing an absolute path that wasn't substituted in.","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."],"exampleFix":"// before\n$ node export-latest-verifier-request.ts --test-case-path\n// after\n$ node export-latest-verifier-request.ts --test-case-path /tmp/my-case.json","handlingStrategy":"validation","validationCode":"// Reuse the same checkMissingValues helper from error 436 — it already covers --test-case-path.\nconst missing = checkMissingValues(process.argv.slice(2));\nif (missing.length) throw new Error(`Missing values for: ${missing.join(', ')}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["cli","argument-parsing","verifier-export","configuration","developer-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}