spacedriveapp/spacedrive · error · anyhow::Error
No libraries found. Create a library first with: sd librar
Error message
No libraries found. Create a library first with: sd library create <name>
What it means
Error "No libraries found. Create a library first with: sd library create <name>" thrown in spacedriveapp/spacedrive.
Source
Thrown at apps/cli/src/domains/library/mod.rs:280
if !config_path.exists() {
anyhow::bail!(
"Device config not found. Please run the daemon first to initialize device config."
);
}
let config_data = std::fs::read_to_string(&config_path)?;
let device_config: sd_core::device::DeviceConfig = serde_json::from_str(&config_data)?;
let local_device_id = device_config.id;
// Step 1: Select local library
let libraries: Vec<sd_core::ops::libraries::list::output::LibraryInfo> = execute_core_query!(
ctx,
sd_core::ops::libraries::list::query::ListLibrariesInput {
include_stats: false
}
);
if libraries.is_empty() {
anyhow::bail!(
"No libraries found. Create a library first with:\n sd library create <name>"
);
}
let library_choices: Vec<String> = libraries
.iter()
.map(|lib| format!("{} ({})", lib.name, lib.id))
.collect();
let library_idx = select("Select local library to sync", &library_choices)?;
let local_library_id = libraries[library_idx].id;
println!(
"\n✓ Selected local library: {}\n",
libraries[library_idx].name
);
// Step 2: Select remote device from paired devicesView on GitHub (pinned to 6dfeccf211)
When it happens
Trigger: Thrown at apps/cli/src/domains/library/mod.rs:280 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/bff5c42eca4ef228.
Report an issue: GitHub.