DioxusLabs/dioxus · error · anyhow::Error
Cannot download component registry '{}' while offline
Error message
Cannot download component registry '{}' while offline What it means
Offline guard in RemoteComponentRegistry::resolve (called from update): the component registry repository is not present in the local cache and needs to be cloned, but the CLI is running in offline mode so no network fetch is permitted. The inputs at fault are the registry git URL (and optional rev) that cannot be downloaded under the offline constraint.
Source
Thrown at packages/cli/src/cli/component.rs:363
/// The revision of the component registry
#[arg(long)]
rev: Option<String>,
}
impl RemoteComponentRegistry {
/// Resolve the path to the component registry, downloading the remote registry if needed
async fn resolve(&self) -> Result<PathBuf> {
// If a git url is provided use that (plus optional rev)
// Otherwise use the built-in registry
let (git, rev) = self.resolve_or_default();
let repo_dir = Workspace::component_cache_path(&git, rev.as_deref());
// If the repo already exists, use it otherwise clone it
if !repo_dir.exists() {
// If offline, we cannot download the registry
if verbosity_or_default().offline {
bail!("Cannot download component registry '{}' while offline", git);
}
// Make sure the parent directory exists
tokio::fs::create_dir_all(&repo_dir).await?;
tokio::task::spawn_blocking({
let git = git.clone();
let repo_dir = repo_dir.clone();
move || {
println!("Downloading {git}...");
// Clone the repo
let repo = Repository::clone(&git, repo_dir)?;
// If a rev is provided, checkout that rev
if let Some(rev) = &rev {
Self::checkout_rev(&repo, &git, rev)?;
}
View on GitHub (pinned to 24f6a829df)
Solutions
- The component registry cannot be downloaded offline. Run the command again with network access.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cli/src/cli/component.rs:363 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/10272ea8db2678ed.
Report an issue: GitHub.