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

  1. Supply the scenario name: `--scenario "cross-team report"`.
  2. Alternatively use the positional form: `node export-latest-verifier-request.ts <slug> <scenario-name>` (first positional is slug, second is scenario).
  3. 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

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


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/bc1c5fa89b39acba. Report an issue: GitHub.