DioxusLabs/dioxus · error

Component ' ' not found in registry

Error message

Component '{}' not found in registry

What it means

Lookup failure in find_component: the component name supplied to a dx component subcommand was not found among the ResolvedComponent entries loaded from the registry. The input at fault is the user-provided component name argument; the registry contents are valid, the name simply does not match.

Solutions

  1. The component is not in the registry. Check the component name and install or update the registry.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/cli/component.rs:532 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/2337a4f859933846. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/cli/component.rs:532

            .collect()
    }
}

impl Deref for ResolvedComponent {
    type Target = Component;

    fn deref(&self) -> &Self::Target {
        &self.component
    }
}

// Find a component by name in a list of components
fn find_component(components: &[ResolvedComponent], component: &str) -> Result<ResolvedComponent> {
    components
        .iter()
        .find(|c| c.name == component)
        .cloned()
        .ok_or_else(|| anyhow::anyhow!("Component '{}' not found in registry", component))
}

/// Get the path to the components module, defaulting to src/components
fn components_root(module_path: Option<&Path>, config: &DioxusConfig) -> Result<PathBuf> {
    if let Some(module_path) = module_path {
        return Ok(PathBuf::from(module_path));
    }

    let root = Workspace::crate_root_from_path()?;

    if let Some(component_path) = &config.components.components_dir {
        return Ok(root.join(component_path));
    }

    Ok(root.join("src").join("components"))
}

/// Get the path to the global assets directory, defaulting to assets

View on GitHub (pinned to 24f6a829df)