{"record":{"id":"b07e20eb1e9f0df7","repo":"wasmerio/wasmer","slug":"template-template-not-found-in-the-registry","errorCode":null,"errorMessage":"Template '{template}' not found in the registry","messagePattern":"Template '(.+?)' not found in the registry","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/app/create.rs","lineNumber":536,"sourceCode":"    }\n\n    // A utility function used to fetch the URL of the template to use.\n    async fn get_template_url(\n        &self,\n        client: &WasmerClient,\n    ) -> anyhow::Result<(url::Url, Option<PathBuf>)> {\n        let (mut url, selected_template): (url::Url, Option<AppTemplate>) = if let Some(template) =\n            &self.template\n        {\n            if let Ok(url) = url::Url::parse(template) {\n                (url, None)\n            } else if let Some(template) =\n                wasmer_backend_api::query::fetch_app_template_from_slug(client, template.clone())\n                    .await?\n            {\n                (url::Url::parse(&template.repo_url)?, Some(template))\n            } else {\n                anyhow::bail!(\"Template '{template}' not found in the registry\")\n            }\n        } else {\n            if self.non_interactive {\n                anyhow::bail!(\"No template selected\")\n            }\n\n            let theme = ColorfulTheme::default();\n            let registry = self\n                .env\n                .registry_public_url()?\n                .host_str()\n                .unwrap_or(\"unknown_registry\")\n                .replace('.', \"_\");\n            let cache_dir = self.env.cache_dir().join(\"templates\").join(registry);\n\n            let languages = Self::fetch_template_languages_cached(client, &cache_dir).await?;\n\n            let items = languages.iter().map(|t| t.name.clone()).collect::<Vec<_>>();","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/app/create.rs#L518-L554","documentation":"get_template_url resolves an app template by slug through the registry (fetch_app_template_from_slug). When a template name was provided but the registry has no matching slug, it bails. The library throws it because the requested template simply does not exist remotely.","triggerScenarios":"Running `wasmer app create --template <slug>` where <slug> is not found via fetch_app_template_from_slug on the configured registry.","commonSituations":"Typo in the template slug; template removed/renamed upstream; pointing at a registry (custom --registry) that does not host the template.","solutions":["Check the exact template slug against the registry (browse available templates) and correct the --template value.","Verify you are using the intended registry (registry flag/env) where the template exists.","Omit --template and pick interactively, or use --use-local-manifest for a local app."],"exampleFix":"// before\n// wasmer app create --template wasmer/hello-word   (typo)\n// after\n// wasmer app create --template wasmer/hello-world","handlingStrategy":"validation","validationCode":"// verify the slug exists before using it\nconst tpl = await registry.fetchAppTemplateFromSlug(slug);\nif (!tpl) throw new Error(`template ${slug} not found in registry`);","typeGuard":"fn template_exists(t: &Option<AppTemplate>) -> bool {\n    t.is_some()\n}","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"not found in the registry\") => {\n        eprintln!(\"listing available templates...\");\n        // fetch and show template list, then retry with a valid slug\n    }\n    other => other?,\n}","preventionTips":["Copy template slugs from the registry UI/docs instead of typing them.","Verify the slug against the registry you actually target (--registry).","Keep a tested set of known-good template slugs in deploy scripts."],"tags":["wasmer","cli","registry","template"],"backgroundTag":"template-not-found","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}