n8n-io/n8n · error · Error
--source must be "disk" or "langtracer"
Error message
--source must be "disk" or "langtracer"
What it means
Thrown by parseArgs() in build-mcp-manifest.ts:207 when the value passed to --source is neither 'disk' nor 'langtracer'. The --source flag selects the test-case source: 'disk' (default) reads JSON files from --workflow-dir (or the n8n repo's evaluations/data/workflows/), 'langtracer' pulls a suite over MCP. Any other value is rejected because no provider exists for it.
Source
Thrown at packages/@n8n/instance-ai/evaluations/cli/build-mcp-manifest.ts:207
result.projectId = nextArg(argv, i, arg);
i += 2;
break;
case '--tier':
result.tier = nextArg(argv, i, arg);
i += 2;
break;
case '--workflow-dir':
result.workflowDir = nextArg(argv, i, arg);
i += 2;
break;
case '--build-cwd':
result.buildCwd = nextArg(argv, i, arg);
i += 2;
break;
case '--source': {
const value = nextArg(argv, i, arg);
if (value !== 'disk' && value !== 'langtracer') {
throw new Error('--source must be "disk" or "langtracer"');
}
result.source = value;
i += 2;
break;
}
case '--suite':
result.suite = nextArg(argv, i, arg);
i += 2;
break;
case '-h':
case '--help':
return { helpRequested: true };
default:
if (arg.startsWith('--')) {
throw new Error(`Unknown flag: ${arg.split('=', 1)[0]} (use --help)`);
}
result.slugs.push(arg);
i += 1;View on GitHub (pinned to 5ac6606e81)
Solutions
- Use --source disk (read test-case JSON from --workflow-dir or the repo default).
- Use --source langtracer (pull a suite over MCP; requires --suite and LANGTRACER_URL/LANGTRACER_API_KEY).
- Remove --source entirely to accept the default (disk).
- Correct the typo.
Example fix
// before pnpm eval:build-mcp-manifest --source dik // after pnpm eval:build-mcp-manifest --source disk
Defensive patterns
Strategy: validation
Validate before calling
const VALID_SOURCES = new Set(['disk', 'langtracer']);
function validateSource(args: string[]): void {
const idx = args.indexOf('--source');
if (idx !== -1 && !VALID_SOURCES.has(args[idx + 1])) {
throw new Error(`--source must be 'disk' or 'langtracer', got: ${args[idx + 1]}`);
}
} Type guard
function isValidSource(v: string): v is 'disk' | 'langtracer' {
return v === 'disk' || v === 'langtracer';
} Prevention
- Remember the only valid sources are disk (files) and langtracer (MCP suite).
- Omit --source to accept the default (disk).
- Keep source and suite flags together in langtracer templates.
When it happens
Trigger: Passing `--source <anything-other-than-disk-or-langtracer>` to build-mcp-manifest, e.g. --source github, --source db, or a typo like --source dik. The check fires inside the --source case immediately after reading the value via nextArg().
Common situations: A typo in the source name, or a developer assuming a source type (e.g. 'api', 'remote') that this tool does not support. The valid set mirrors the eval CLI's Zod enum (z.enum(['disk','langtracer'])).
Related errors
- Unknown flag: ${arg.split('=', 1)[0]} (use --help)
- --iterations must be >= 1
- --concurrency must be >= 1
- --delete-prebuilt-workflows applies to --prebuilt-workflows.
- ${[...new Set(raw.buildOnlyFlags)].join(', ')} only take${ra
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/a0cb894d9bd9f40d.
Report an issue: GitHub.