denoland/deno · error
LAUFEY backend binary has no parent directory
Error message
LAUFEY backend binary has no parent directory: {} What it means
find_binary_dir() takes the backend binary path returned by find_binary() and returns its containing directory (Windows/Linux support files sit next to the binary). Path::parent() only returns None for root/prefix paths, so this error indicates the locator produced a degenerate path — effectively an internal invariant violation, not something user input normally reaches.
Solutions
- Clear the laufey cache directory and re-run so the tree is re-extracted.
- If using LAUFEY_DEV_DIR, verify the checkout layout is sane and the env var points at a real directory.
- Reproduce with the exact backend/target and report it — this path should not be reachable in practice.
Defensive patterns
Strategy: validation
Validate before calling
# The locator's output should always be a real file under a directory; sanity-check
# the cache tree before relying on it:
find ~/.cache/deno/desktop/laufey -type f -name 'laufey*' -print0 \
| xargs -0 -I{} test -f '{}' && echo 'cache tree sane' Prevention
- Do not hand-place files at the cache root; keep the cache populated only by the tool itself.
- Treat this error as an invariant break — capture the exact backend/target and cache state before clearing it, then report upstream.
When it happens
Trigger: locate_backend_binary/locate_dev_backend_binary returned a path with no parent component ( '/', 'C:\\' ). With the locators walking real extracted trees this is close to unreachable; it exists to keep unwrap() panics out of the code.
Common situations: Almost none by design; would require a corrupted cache where a binary 'file' resolved to the filesystem root. Included so degenerate paths degrade to an error instead of a panic.
Related errors
- app bundle has no name
- ERR_INVALID_ARG_TYPE
- Invalid extract destination
- invalid --output: dylib path has no file stem
- LAUFEY cache dir has no parent
AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20).
Data as JSON: /api/errors/27521551ef113db6.
Report an issue: GitHub.
Appendix: source
Thrown at cli/tools/desktop.rs:2156
let dir = self.ensure_downloaded(backend, target).await?;
locate_app_bundle(&dir, backend).ok_or_else(|| {
deno_core::anyhow::anyhow!(
"could not find '{backend}' .app bundle inside {} (backend may not ship as an app for target '{target}')",
dir.display()
)
})
}
/// Directory containing the backend binary and its support files (used on
/// Windows / Linux where support files sit alongside the binary).
async fn find_binary_dir(
&self,
backend: &str,
target: &str,
) -> Result<PathBuf, AnyError> {
let binary = self.find_binary(backend, target).await?;
let parent = binary.parent().ok_or_else(|| {
deno_core::anyhow::anyhow!(
"LAUFEY backend binary has no parent directory: {}",
binary.display()
)
})?;
Ok(parent.to_path_buf())
}
}
fn laufey_archive_name(backend: &str, target: &str) -> String {
let ext = if target.contains("windows") {
"zip"
} else {
"tar.gz"
};
// The `raw` backend ships under the `winit` archive name upstream.
let archive_backend = match backend {
"raw" => "winit",
other => other,View on GitHub (pinned to f7822238ca)