{"record":{"id":"f6b1fdc1b139c7dc","repo":"windmill-labs/windmill","slug":"unknown-language-language-valid-languages","errorCode":null,"errorMessage":"Unknown language '${language}'. Valid languages: ${validLanguages}","messagePattern":"Unknown language '(.+?)'\\. Valid languages: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/script/script.ts","lineNumber":1634,"sourceCode":"const languageAliases: Record<string, ScriptLanguage> = {\n  python: \"python3\",\n};\n\nasync function bootstrap(\n  opts: GlobalOptions & { summary: string; description: string },\n  scriptPath: string,\n  language: ScriptLanguage | string\n) {\n  if (!validatePath(scriptPath)) {\n    return;\n  }\n\n  const resolvedLanguage = (languageAliases[language] ?? language) as ScriptLanguage;\n\n  const scriptInitialCode = scriptBootstrapCode[resolvedLanguage];\n  if (scriptInitialCode === undefined) {\n    const validLanguages = Object.keys(scriptBootstrapCode).sort().join(\", \");\n    throw new Error(\n      `Unknown language '${language}'. Valid languages: ${validLanguages}`\n    );\n  }\n\n  const config = await readConfigFile();\n\n  const extension = filePathExtensionFromContentType(\n    resolvedLanguage,\n    config.defaultTs\n  );\n  const scriptCodeFileFullPath = scriptPath + extension;\n  const scriptMetadataFileFullPath = scriptPath + \".script.yaml\";\n\n  try {\n    await stat(scriptCodeFileFullPath);\n    throw new Error(\"File already exists: \" + scriptCodeFileFullPath);\n  } catch (e: any) {\n    if (e.message?.startsWith(\"File already exists\")) throw e;","sourceCodeStart":1616,"sourceCodeEnd":1652,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/script/script.ts#L1616-L1652","documentation":"`wmill script bootstrap` resolves the requested language through `languageAliases`, then looks up starter code in `scriptBootstrapCode`. If no bootstrap template exists for the (resolved) language, it throws with the sorted list of valid languages.","triggerScenarios":"`wmill script bootstrap my_script <lang>` with a misspelled or unsupported language value, e.g. `python3` when only `python` is aliased, `js` instead of `typescript`, or `bash` instead of `shell`/`bun`.","commonSituations":"Typing a language name from another tool's vocabulary (`golang` vs `go`, `py` vs `python`); copying a command from docs for a Windmill version that doesn't support that language yet; shell tab-completion inserting the file extension (`.ts`) instead of the language name.","solutions":["Use one of the languages listed in the error message.","Check for a language alias (e.g. `deno` for typescript-deno) supported by your CLI version.","Update the CLI (`npm i -g windmill-cli` or `brew upgrade wmill`) if the language is newer than your installed version.","Run `wmill script bootstrap --help` to see accepted values."],"exampleFix":"// before\nwmill script bootstrap f/my_script js\n// after\nwmill script bootstrap f/my_script typescript","handlingStrategy":"validation","validationCode":"const valid = ['python','typescript','go','shell','bun','deno','ansible','bash','powershell','php','rust','sql','nunjucks','graphql'];\nif (!valid.includes(lang)) {\n  throw new Error(`Language '${lang}' not supported; use one of: ${valid.join(', ')}`);\n}","typeGuard":"function isSupportedLanguage(l: string): l is SupportedLanguage {\n  return ['python','typescript','go','shell','bun','deno'].includes(l);\n}","tryCatchPattern":"try {\n  await wmill.script.bootstrap(path, lang);\n} catch (e) {\n  if (String(e.message).startsWith('Unknown language')) {\n    console.error(e.message); // message lists valid languages\n  }\n  throw e;\n}","preventionTips":["Tab-complete the language argument where supported.","Check `wmill --version` and upgrade before using newly added languages.","Keep a team cheat-sheet of canonical Windmill language names."],"tags":["cli","validation","unsupported-language","bootstrap"],"backgroundTag":"invalid-enum-value","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"}