{"record":{"id":"71e8cfab8d3e873e","repo":"clockworklabs/SpacetimeDB","slug":"unknown-client-language","errorCode":null,"errorMessage":"Unknown client language: {}","messagePattern":"Unknown client language: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/subcommands/init.rs","lineNumber":106,"sourceCode":"    Csharp,\n    TypeScript,\n}\n\nimpl ClientLanguage {\n    fn as_str(&self) -> &'static str {\n        match self {\n            ClientLanguage::Rust => \"rust\",\n            ClientLanguage::Csharp => \"csharp\",\n            ClientLanguage::TypeScript => \"typescript\",\n        }\n    }\n\n    fn from_str(s: &str) -> anyhow::Result<Option<Self>> {\n        match s.to_lowercase().as_str() {\n            \"rust\" => Ok(Some(ClientLanguage::Rust)),\n            \"csharp\" | \"c#\" => Ok(Some(ClientLanguage::Csharp)),\n            \"typescript\" => Ok(Some(ClientLanguage::TypeScript)),\n            _ => Err(anyhow!(\"Unknown client language: {}\", s)),\n        }\n    }\n}\n\npub struct TemplateConfig {\n    pub project_name: String,\n    pub project_path: PathBuf,\n    pub template_type: TemplateType,\n    pub server_lang: Option<ServerLanguage>,\n    pub client_lang: Option<ClientLanguage>,\n    pub github_repo: Option<String>,\n    pub template_def: Option<TemplateDefinition>,\n    pub use_local: bool,\n    pub native_aot: bool,\n}\n\n#[derive(Debug, Clone, Default)]\npub struct InitOptions {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/subcommands/init.rs#L88-L124","documentation":"The client language parser accepts only `rust`, `csharp`, `c#`, and `typescript` (case-insensitive) — there is no C++ client option. Unlike the server language, this value is parsed from the template catalog's `client_lang` metadata embedded in the CLI, not from your command line, so hitting it means the embedded catalog entry references a client language this CLI build does not know.","triggerScenarios":"Selecting a template whose catalog entry lists a `client_lang` outside {rust, csharp, c#, typescript} — e.g. a template defined for a newer CLI; a CLI build where templates.json and the ClientLanguage enum went out of sync.","commonSituations":"Pre-release or mismatched CLI builds; templates added to the catalog after your CLI was built; custom template catalogs injected into a build.","solutions":["Update the SpacetimeDB CLI to the latest version so the catalog and parser agree","Choose a different template or use `--lang` instead of `--template`","If it persists on the latest release, report it with the template id and CLI version"],"exampleFix":"# before — template catalog references an unknown client language\nspacetime init my-app --non-interactive --template quickstart-new\n\n# after — update CLI, then scaffold by language instead\nspacetime update && spacetime init my-app --non-interactive --lang rust","handlingStrategy":"fallback","validationCode":"# List the catalog your CLI actually knows, then pick a template id from it:\nspacetime init --template=   # prints 'Available templates:' — choose from this list only","typeGuard":"// Rust: matches init's ClientLanguage::from_str acceptance set.\nfn is_supported_client_lang(s: &str) -> bool {\n    matches!(\n        s.trim().to_lowercase().as_str(),\n        \"rust\" | \"csharp\" | \"c#\" | \"typescript\"\n    )\n}","tryCatchPattern":null,"preventionTips":["The client language comes from the template catalog embedded in the CLI — keep the CLI updated rather than working around parse errors","Pin a known-good CLI version in CI so catalog/parser mismatches can't appear mid-pipeline","Prefer --lang over --template when you only need a supported language scaffold"],"tags":["init","language","template-catalog","version-skew"],"backgroundTag":"invalid-language-value","analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}