{"record":{"id":"2337a4f859933846","repo":"DioxusLabs/dioxus","slug":"component-not-found-in-registry","errorCode":null,"errorMessage":"Component '{}' not found in registry","messagePattern":"Component '(.+?)' not found in registry","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli/component.rs","lineNumber":532,"sourceCode":"            .collect()\n    }\n}\n\nimpl Deref for ResolvedComponent {\n    type Target = Component;\n\n    fn deref(&self) -> &Self::Target {\n        &self.component\n    }\n}\n\n// Find a component by name in a list of components\nfn find_component(components: &[ResolvedComponent], component: &str) -> Result<ResolvedComponent> {\n    components\n        .iter()\n        .find(|c| c.name == component)\n        .cloned()\n        .ok_or_else(|| anyhow::anyhow!(\"Component '{}' not found in registry\", component))\n}\n\n/// Get the path to the components module, defaulting to src/components\nfn components_root(module_path: Option<&Path>, config: &DioxusConfig) -> Result<PathBuf> {\n    if let Some(module_path) = module_path {\n        return Ok(PathBuf::from(module_path));\n    }\n\n    let root = Workspace::crate_root_from_path()?;\n\n    if let Some(component_path) = &config.components.components_dir {\n        return Ok(root.join(component_path));\n    }\n\n    Ok(root.join(\"src\").join(\"components\"))\n}\n\n/// Get the path to the global assets directory, defaulting to assets","sourceCodeStart":514,"sourceCodeEnd":550,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/cli/src/cli/component.rs#L514-L550","documentation":"The dx component subcommands look components up by exact name in the resolved component registry (find_component scans ResolvedComponent entries for a .name equal to the argument). If no entry matches, the command fails with this anyhow error rather than suggesting alternatives.","triggerScenarios":"Running a component command such as dx component add <name> where <name> differs from the registry entry — wrong casing, a renamed component, or a component list that was never fetched/synced locally.","commonSituations":"Typo or casing mismatch in the component name; using an old name after the upstream component was renamed; offline machine where the registry cache is empty.","solutions":["List the available components (dx component list or the dioxuslabs.com/components registry page) and use the exact name","Check spelling and casing: matching is a plain == on the name string","Refresh/update the local registry cache, then retry the command"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Confirm the exact name exists before running the command\ndx component list | grep -Fx \"my-component\" || echo 'name not in registry'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy component names from dx component list output rather than typing them","Remember matching is exact (case-sensitive ==)","Refresh the registry cache after upgrading dx"],"tags":["cli","components","registry"],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}