windmill-labs/windmill · error
Failed to infer schema for ${runnableId}: ${schemaError.mess
Error message
Failed to infer schema for ${runnableId}: ${schemaError.message} What it means
Wrap-around catch in inferRunnableSchemaFromFile: the language-specific inferSchema call (over the runnable's content and current schema) threw — e.g. unparseable code, unsupported construct, or a parser crash. Logged as a warning and returns undefined, so only this runnable loses schema inference.
Source
Thrown at cli/src/commands/app/app_metadata.ts:967
}
const remotePath = appFolder.replaceAll(SEP, "/");
try {
const schemaResult = await inferSchema(
language as ScriptLanguage,
content,
currentSchema,
`${remotePath}/${runnableId}`
);
log.info(colors.green(` Inferred schema for ${runnableId}`));
return {
runnableId: runnableId,
schema: schemaResult.schema,
};
} catch (schemaError: any) {
log.warn(
colors.yellow(
`Failed to infer schema for ${runnableId}: ${schemaError.message}`
)
);
return undefined;
}
}
/**
* Infers schemas for every inline runnable code file in the app's backend
* folder. Used at `wmill app dev` startup so the initial wmill.d.ts has typed
* args without waiting for a file change to trigger the watcher.
*
* Returns a map of runnableId -> schema. Files that fail inference or are not
* inline runnables are silently skipped - their entries will fall back to
* `args: {}` in the generated d.ts.
*/
export async function inferAllInlineSchemas(View on GitHub (pinned to e474e8803c)
Solutions
- Fix the syntax error in the runnable's code so the parser can infer the schema
- Provide the schema explicitly in the runnable YAML to bypass inference
- Check the inferred error message from the language parser for the offending code
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at cli/src/commands/app/app_metadata.ts:967 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/8ff349df51d4ef88.
Report an issue: GitHub.