DioxusLabs/dioxus · error

Component '{}' not found in registry

Error message

Component '{}' not found in registry

What it means

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.

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 393d190a80)

Solutions

  1. List the available components (dx component list or the dioxuslabs.com/components registry page) and use the exact name
  2. Check spelling and casing: matching is a plain == on the name string
  3. Refresh/update the local registry cache, then retry the command
Defensive patterns

Strategy: validation

Validate before calling

# Confirm the exact name exists before running the command
dx component list | grep -Fx "my-component" || echo 'name not in registry'

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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