windmill-labs/windmill · error · LockfileGenerationError
Failed to generate lockfile: ${message}
Error message
Failed to generate lockfile: ${message} What it means
The queued flow dependencies job finished but reported failure (`completion.success` false); the CLI extracts the job result's error message (falling back to a JSON dump of the result) and throws it as a LockfileGenerationError. This is a server-side lockfile computation failure, not a client transport problem.
Source
Thrown at cli/src/commands/flow/flow_metadata.ts:510
let completion;
try {
completion = await pollJobWithQueueLogging(
workspace.workspaceId,
jobId,
{ label: `flow deps ${remotePath}` },
);
} catch (e: any) {
throw new LockfileGenerationError(
`Failed to poll flow dependencies job ${jobId}: ${e?.message ?? e}`
);
}
const result = completion.result as any;
if (!completion.success) {
const message =
result?.error?.message ??
(typeof result === "string" ? result : JSON.stringify(result, null, 2));
throw new LockfileGenerationError(`Failed to generate lockfile: ${message}`);
}
return result?.updated_flow_value;
}
View on GitHub (pinned to e474e8803c)
Solutions
- Fix the inner message shown after 'Failed to generate lockfile:' — usually a bad dependency or script error in one of the flow's modules
- Test the failing script standalone (`wmill script` run / dev) to reproduce the dependency error
- Check lockfile-related settings for the workspace (e.g. pinned Python/Node environments)
- Upgrade CLI/server if the resolver rejects a format the other version accepts
Example fix
// before (flow module) requirements: pandas==99.99 // after requirements: pandas>=2.0 # use a resolvable version
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate each module's dependencies offline before queueing for (const req of module.requirements ?? []) assertResolvable(req); for (const mod of modules) if (mod.content) assertParses(mod.language, mod.content);
Try / catch
try {
await generateLocks();
} catch (e) {
if (String(e).startsWith('Failed to generate lockfile:')) {
console.error('Server rejected dependency resolution:', e.message);
// fix the module named in the inner message, then retry
}
} Prevention
- Test rawscripts standalone before embedding in flows
- Pin dependency versions that actually exist in the registry
- Keep workspace lockfile/dependency settings documented for the team
- Match CLI/server versions so the resolver format is compatible
When it happens
Trigger: The dependency-resolution job completed unsuccessfully: a dependency in the flow (script/npm requirement) cannot be resolved, an inline script has invalid code, or the worker running the job errored and stored an error result.
Common situations: A rawscript with a syntax error or unresolvable Python/pip dependency; Node module pinned to a nonexistent version; monorepo dependency files missing server-side.
Related errors
- Cannot regenerate lock for flow ${remote_path}: missing inli
- Failed to queue flow dependencies job: ${queueResponse.statu
- Failed to poll flow dependencies job ${jobId}: ${e?.message
- Failed to generate lockfile: ${message}
- Failed to generate lockfile: ${JSON.stringify(result, null,
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/4c6eeb62c5b6e07c.
Report an issue: GitHub.