windmill-labs/windmill · error
Step '${stepId}' not found in flow. Available steps: ${avail
Error message
Step '${stepId}' not found in flow. Available steps: ${available} What it means
`wmill flow preview --step <stepId>` looks up the step inside the local flow value via findStepInFlowValue; when no module matches the given id it throws, listing every valid step id collected from the flow for comparison.
Source
Thrown at cli/src/commands/flow/flow.ts:779
log.info(colors.bold.underline.green("Flow preview completed"));
log.info(JSON.stringify(result, null, 2));
}
}
async function previewStep(
stepId: string,
localFlow: FlowFile,
flowWmPath: string,
workspace: { workspaceId: string },
baseArgs: Record<string, unknown>,
tempScriptRefs: Record<string, string> | undefined,
silent: boolean,
tag: string | undefined,
) {
const module = findStepInFlowValue(localFlow.value, stepId);
if (!module) {
const available = collectStepIds(localFlow.value).join(", ") || "(none)";
throw new Error(`Step '${stepId}' not found in flow. Available steps: ${available}`);
}
// The preprocessor module receives args via _ENTRYPOINT_OVERRIDE so the
// runner picks the preprocessor entrypoint (matches frontend behavior in
// copilot/chat/flow/core.ts).
const args =
stepId === "preprocessor"
? { _ENTRYPOINT_OVERRIDE: "preprocessor", ...baseArgs }
: baseArgs;
const moduleValue = module.value;
let jobId: string;
if (moduleValue?.type === "rawscript") {
log.info(colors.yellow(`Previewing step '${stepId}' (rawscript, ${moduleValue.language})...`));
jobId = await wmill.runScriptPreview({
workspace: workspace.workspaceId,
requestBody: {
content: moduleValue.content ?? "",View on GitHub (pinned to e474e8803c)
Solutions
- Use one of the ids printed in 'Available steps' in the error message
- Check the module ids in the local flow.yaml and correct the --step argument
- Re-pull the flow (`wmill flow pull`) if the local copy is stale
Example fix
// before wmill flow preview .flow/__flow --step fetch_data // after wmill flow preview .flow/__flow --step fetchData # id shown in 'Available steps'
Defensive patterns
Strategy: validation
Validate before calling
const flow = await fsp.readFile(join(flowPath, 'flow.yaml'), 'utf8').then(parseFlowYaml);
const ids = collectStepIds(flow.value);
if (!ids.includes(stepId)) throw new Error(`step '${stepId}' not in flow; available: ${ids.join(', ')}`); Prevention
- Keep a step-id list in a comment at the top of flow.yaml during manual edits
- Never rename step ids without grepping the repo for references
- Pull the latest flow before previewing a step
- Match the exact casing of ids shown in the UI
When it happens
Trigger: `wmill flow preview <flowPath> --step <id>` where the id is misspelled, refers to a step that was renamed/removed locally, or uses the wrong id form (nested/subflow ids).
Common situations: Editing flow.yaml by hand and forgetting to update a step reference; running an old command from shell history after refactoring the flow; wrong casing of the step id.
Related errors
- Flow path must be a .flow/__flow directory or a flow.yaml fi
- App ${appPath} not found
- Dependency generation failed: ${queueResponse.status} ${queu
- Failed to poll dependencies job ${jobId}: ${e?.message ?? e}
- No response body for SSE stream
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/cdaa9ad6bbff51bd.
Report an issue: GitHub.