{"record":{"id":"fabf85a5ea6656f9","repo":"windmill-labs/windmill","slug":"unknown-kind-kind","errorCode":null,"errorMessage":"Unknown kind: ${kind}","messagePattern":"Unknown kind: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/windmill-utils-internal/src/deploy.ts","lineNumber":390,"sourceCode":"    return provider.existsVariable({ workspace, path });\n  } else if (kind === \"resource\") {\n    return provider.existsResource({ workspace, path });\n  } else if (kind === \"resource_type\") {\n    return provider.existsResourceType({ workspace, path });\n  } else if (kind === \"folder\") {\n    return provider.existsFolder({ workspace, name: folderName(path) });\n  } else if (kind === \"schedule\") {\n    return provider.existsSchedule({ workspace, path });\n  } else if (kind === \"datatable_migration\") {\n    const { datatable, timestamp } = parseDatatableMigrationDeployPath(path);\n    const migrations = await provider.listDatatableMigrations({ workspace });\n    return (migrations as { datatable: string; timestamp: number }[]).some(\n      (m) => m.datatable === datatable && m.timestamp === timestamp\n    );\n  } else if (isTriggerKind(kind)) {\n    return provider.existsTriggerByKind(kind, { workspace, path });\n  }\n  throw new Error(`Unknown kind: ${kind}`);\n}\n\n/**\n * Fetch one part of a raw app's compiled bundle.\n *\n * A bundle with no styles may have no `css` blob stored at all, which older\n * backends serve as a 404. Absent means empty, not broken — letting that reject\n * makes such an app permanently un-deployable. Only `.css` and only a 404 are\n * forgiven: swallowing auth/network failures would silently deploy the app with\n * its styles stripped, and a missing `.js` is a genuinely broken bundle.\n */\nexport async function getRawAppBundlePart(\n  provider: DeployProvider,\n  secret: string,\n  ext: \"js\" | \"css\",\n  workspace: string\n): Promise<any> {\n  try {","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/windmill-utils-internal/src/deploy.ts#L372-L408","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nawait checkItemExists(provider, { kind: \"trigger\", ... })\n\n// after\nawait checkItemExists(provider, { kind: \"http_trigger\", ... })","handlingStrategy":"type-guard","validationCode":"import { isTriggerKind } from 'windmill-utils-internal/deploy';\nconst DEPLOY_KINDS = ['script','flow','app','variable','resource','resource_type','folder','schedule','datatable_migration'];\nfunction isKnownKind(kind: string): boolean {\n  return DEPLOY_KINDS.includes(kind) || isTriggerKind(kind);\n}\nif (!isKnownKind(item.kind)) throw new Error(`Skip unknown kind ${item.kind}`);","typeGuard":"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;\nfunction isDeployKind(kind: string): kind is typeof KNOWN_KINDS[number] {\n  return (KNOWN_KINDS as readonly string[]).includes(kind);\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["validation","deploy","cli"],"backgroundTag":"unsupported-resource-kind","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}