nikivdev/code · error
no flox packages found for "{}"
Error message
no flox packages found for "{}" What it means
After resolving the search query, prompt_flox_package searches flox (via typesense if configured, otherwise by shelling out to the flox binary). If the search succeeds but yields zero entries, it bails with this error including the query.
Source
Thrown at src/install.rs:543
Some(config) => match typesense_search(&config, query) {
Ok(entries) if !entries.is_empty() => entries,
Ok(_) => {
let flox_bin = resolve_flox_bin()?;
flox_search_with_aliases(&flox_bin, query)?
}
Err(err) => {
eprintln!("WARN typesense search failed: {err}");
let flox_bin = resolve_flox_bin()?;
flox_search_with_aliases(&flox_bin, query)?
}
},
None => {
let flox_bin = resolve_flox_bin()?;
flox_search_with_aliases(&flox_bin, query)?
}
};
if entries.is_empty() {
bail!("no flox packages found for \"{}\"", query);
}
let mut input = String::new();
for entry in &entries {
let version = entry.version.as_deref().unwrap_or("-");
let desc = entry
.description
.as_deref()
.filter(|d| !d.trim().is_empty())
.unwrap_or("No description");
let alias_note = entry
.alias
.as_deref()
.map(|alias| format!(" (alias for {})", alias))
.unwrap_or_default();
input.push_str(&format!(
"{}\t{}\t{}{}\n",
entry.pkg_path, version, desc, alias_noteView on GitHub (pinned to a747e741ae)
Solutions
- Verify the package name spelling and try a broader search term
- Rebuild/refresh the typesense index (run_index) if using typesense
- Run `flox search -a <query>` manually to confirm what the CLI returns
- Check typesense config / flox binary resolution (resolve_flox_bin) points at the intended source
Example fix
// before // query: "ripgrepp" -> no flox packages found for "ripgrepp" // after // query: "ripgrep" -> results listed in fzf
Defensive patterns
Strategy: fallback
Validate before calling
// sanity-check the query and expected catalog before searching assert!(!query.trim().is_empty()); // optionally probe catalog availability first // flox search -a <query> || echo "catalog unreachable"
Try / catch
match prompt_flox_package() {
Err(e) if e.to_string().starts_with("no flox packages found") => {
eprintln!("Nothing matched. Try a broader term or check spelling.");
}
other => other?,
} Prevention
- Verify package names against `flox search` before scripting installs
- Keep the typesense index refreshed via run_index
- Fall back from typesense to the flox CLI when either returns empty
When it happens
Trigger: typesense_search returns an empty hits list, or flox_search_with_aliases (flox binary -a search) returns an empty JSON array, for the given query.
Common situations: Typo in package name; searching a package not in the flox catalog; a stale or partially populated typesense index; flox binary pointed at a channel lacking the package.
Related errors
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/154db32bdc724bdc.
Report an issue: GitHub.