windmill-labs/windmill · error
Unknown kind: ${kind}
Error message
Unknown kind: ${kind} What it means
checkItemExists dispatches an existence check by deploy kind (script, flow, app, variable, resource, resource_type, folder, schedule, datatable_migration, plus the trigger kinds like http_trigger, kafka_trigger, ...). If the kind string matches none of the known branches, it throws `Unknown kind: <kind>`. This indicates the deploy manifest contains a kind the installed CLI version does not understand.
Source
Thrown at cli/windmill-utils-internal/src/deploy.ts:390
return provider.existsVariable({ workspace, path });
} else if (kind === "resource") {
return provider.existsResource({ workspace, path });
} else if (kind === "resource_type") {
return provider.existsResourceType({ workspace, path });
} else if (kind === "folder") {
return provider.existsFolder({ workspace, name: folderName(path) });
} else if (kind === "schedule") {
return provider.existsSchedule({ workspace, path });
} else if (kind === "datatable_migration") {
const { datatable, timestamp } = parseDatatableMigrationDeployPath(path);
const migrations = await provider.listDatatableMigrations({ workspace });
return (migrations as { datatable: string; timestamp: number }[]).some(
(m) => m.datatable === datatable && m.timestamp === timestamp
);
} else if (isTriggerKind(kind)) {
return provider.existsTriggerByKind(kind, { workspace, path });
}
throw new Error(`Unknown kind: ${kind}`);
}
/**
* Fetch one part of a raw app's compiled bundle.
*
* A bundle with no styles may have no `css` blob stored at all, which older
* backends serve as a 404. Absent means empty, not broken — letting that reject
* makes such an app permanently un-deployable. Only `.css` and only a 404 are
* forgiven: swallowing auth/network failures would silently deploy the app with
* its styles stripped, and a missing `.js` is a genuinely broken bundle.
*/
export async function getRawAppBundlePart(
provider: DeployProvider,
secret: string,
ext: "js" | "css",
workspace: string
): Promise<any> {
try {View on GitHub (pinned to e474e8803c)
Solutions
- Check the kind value in the failing item and fix typos
- Upgrade the CLI (`npm i -g windmill-cli` / latest) so new kinds are recognized
- Map the item to the correct DeployKind (`script|flow|app|variable|resource|resource_type|folder|schedule|datatable_migration|*_trigger`)
- Validate kinds against `isTriggerKind` / the TRIGGER_KINDS list before deploying
Example fix
// before
await checkItemExists(provider, { kind: "trigger", ... })
// after
await checkItemExists(provider, { kind: "http_trigger", ... }) Defensive patterns
Strategy: type-guard
Validate before calling
import { isTriggerKind } from 'windmill-utils-internal/deploy';
const DEPLOY_KINDS = ['script','flow','app','variable','resource','resource_type','folder','schedule','datatable_migration'];
function isKnownKind(kind: string): boolean {
return DEPLOY_KINDS.includes(kind) || isTriggerKind(kind);
}
if (!isKnownKind(item.kind)) throw new Error(`Skip unknown kind ${item.kind}`); Type guard
const KNOWN_KINDS = ['script','flow','app','variable','resource','resource_type','folder','schedule','datatable_migration','http_trigger','websocket_trigger','kafka_trigger','nats_trigger','postgres_trigger','mqtt_trigger','sqs_trigger','gcp_trigger','azure_trigger','email_trigger'] as const;
function isDeployKind(kind: string): kind is typeof KNOWN_KINDS[number] {
return (KNOWN_KINDS as readonly string[]).includes(kind);
} Prevention
- Only build deploy items with the exported DeployKind type, never raw strings
- Keep the CLI updated to match the Windmill server version generating your content
- Validate manifest kinds in CI before running deploys
When it happens
Trigger: Calling checkItemExists (via alreadyExists in the deploy loop) with a kind string outside the DeployKind union, e.g. a typo (`scritp`, `varible`), a newer trigger kind not supported by the installed CLI, or an item whose `kind` field is missing/garbled in the sync state.
Common situations: Typo in a deploy/sync manifest's kind field; running an older CLI against content generated by a newer Windmill version that introduced a new kind; programmatically building deploy items with the wrong kind constant.
Related errors
- Invalid migration name '${name}': use only letters, digits,
- Unknown workspace dependencies file format: ${path}. Valid f
- Cannot push flow ${remotePath}: step(s) reference non-worksp
- Completed jobs file must contain an array of jobs
- Queued jobs file must contain an array of jobs
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/fabf85a5ea6656f9.
Report an issue: GitHub.