windmill-labs/windmill · error
Flow ${flowPath} not found
Error message
Flow ${flowPath} not found What it means
During a flow metadata/lock regeneration operation the CLI fetches the flow by path with `wmill.getFlowByPath`; if the API returns nothing (flow absent on the server), it throws this not-found error instead of proceeding to update.
Source
Thrown at cli/src/commands/flow/flow.ts:1233
.option("--json", "Output as JSON (for piping to jq)")
.action(history as any)
.command("show-version", "Show a specific version of a flow")
.arguments("<path:string> <version:string>")
.option("--json", "Output as JSON (for piping to jq)")
.action(showVersion as any)
.command(
"set-permissioned-as",
"Set the on_behalf_of_email for a flow (requires admin or wm_deployers group)"
)
.arguments("<path:string> <email:string>")
.action((async (opts: any, flowPath: string, email: string) => {
const workspace = await resolveWorkspace(opts);
await requireLogin(opts);
const remote = await wmill.getFlowByPath({
workspace: workspace.workspaceId,
path: flowPath,
});
if (!remote) throw new Error(`Flow ${flowPath} not found`);
await wmill.updateFlow({
workspace: workspace.workspaceId,
path: flowPath,
requestBody: {
...remote,
path: flowPath,
on_behalf_of_email: email,
// Derived server-side; see the script command for why.
on_behalf_of: undefined,
preserve_on_behalf_of: true,
// Preserve any user draft at this path (see backend skip_draft_deletion).
skip_draft_deletion: true,
} as any,
});
log.info(colors.green(`Updated permissioned_as for flow ${flowPath} to ${email}`));
}) as any);
export default command;View on GitHub (pinned to e474e8803c)
Solutions
- Verify the flow exists in the target workspace (web UI or `wmill flow list`)
- Check the active workspace with `wmill workspace` and switch if needed
- Push the flow first (`wmill flow push`) so it exists before regenerating locks
- Correct any path typo, matching exact case
Example fix
// before wmill flow generate-locks u/admin/etl_flow # flow not on server // after wmill flow push u/admin/etl_flow && wmill flow generate-locks u/admin/etl_flow
Defensive patterns
Strategy: validation
Validate before calling
const remote = await wmill.getFlowByPath({ workspace: ws.workspaceId, path: flowPath });
if (!remote) throw new Error(`Flow ${flowPath} missing on ${ws.workspaceId}; push it first`); Prevention
- Always push flows before regenerating locks
- Confirm the active workspace with `wmill workspace` in deploy scripts
- Keep flow paths in a single source of truth (manifest) to avoid typos
- Treat path as case-sensitive everywhere
When it happens
Trigger: Running a flow command that updates/regenerates metadata against a path that does not exist remotely — e.g. pushing locks for a flow that was renamed or deleted on the server, or a path typo / wrong workspace.
Common situations: Deploying to a fresh workspace where the flow was never pushed; flow deleted by a teammate; active workspace switched with `wmill workspace switch`; case-sensitive path mismatch.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- App ${appPath} not found
- not a flow
- Cannot push flow ${remotePath}: missing inline script file(s
- Cannot push flow ${remotePath}: step(s) reference non-worksp
- job not found or parent flow not in queue: {}
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/31fc655338d34110.
Report an issue: GitHub.