ErrLookupBackground articles › "path not found", "No such file or directory", "Directory does not exist": when a library can't resolve the path you gave it

"path not found", "No such file or directory", "Directory does not exist": when a library can't resolve the path you gave it

"path not found" and "No such file or directory" errors appear when a CLI tool, build system, or library is given a file or directory path that does not exist, is not a directory where one is required, or resolves against the wrong working directory. This article explains the layers that produce these errors — glob expansion, symlink resolution, cwd-relative joins, mount tables — and the fixes that hold across 53 open-source projects.

Distilled from 99 documented records across 53 repositories.

Background

This family spans CLIs, build tools, dev tooling, and distributed systems, but the mechanism is nearly always the same: before a tool can do its work it must stat, resolve, or walk a path you supplied, and the filesystem (or an analogous namespace like HDFS, a ZooKeeper registry, or an embedded fs.FS) says there is nothing there. The error is produced at the tool's validation layer, before any real work begins — a glob expansion in hadoop's shell that matches zero entries, a filepath.EvalSymlinks in beads' identity library, an fs.existsSync guard in a script, a fs.Stat inside a Go embed filesystem. That early-bail behavior is intentional: nearly every record aborts before reading data, uploading, building, or deleting anything.

What varies is what "not found" actually means. In the simplest cases it is a literal miss: a typo, a deleted directory, a path that never existed (Serena's "Project root not found", SpacetimeDB's "Project path does not exist", Maven's "Non-existing JDK home configuration"). More subtle variants include paths that exist but are the wrong kind of entry — a file where a directory is required (oh-my-pi's "Plugin source directory does not exist", deno's "path not found (symlink not dir)", deepagents' "Path is neither a file nor a directory"), broken or dangling symlinks in the middle of a chain, or special filesystem objects like sockets and FIFOs that pass an existence check but fail the file/directory checks.

A second cluster is resolution-context failure, where the path is fine but the tool resolves it somewhere else. Relative paths are judged against the process working directory, not your shell's (claw-code's /skills install, nocobase's --cwd, CI steps running from a different cwd). Distributed layers add their own indirection: HDFS Router operations fail when a path is not covered by any mount table entry, when the downstream nameservice lacks the destination, or when a source file exists in none of the candidate subclusters — none of which mean the local filesystem is wrong. Even the same project disagrees with itself across backends: Hadoop's registry treats deleting a missing path as an error on the filesystem backend but tolerates it on the ZooKeeper backend.

From the caller's side the messages are usually honest about the miss and often print the fully resolved path — which may differ from what you typed. The message may name an absolute path you never wrote (resolved through symlinks, a registry-root prefix, or expanduser), or, as in Doctrine's proxy-dir error and Maven's -f check, a path derived from your configuration rather than your argument. Reading the printed path and checking it from the same working directory and user the tool runs as is the single most reliable diagnostic step.

Common causes

What usually fixes it

Documented occurrences

…and 79 more across the corpus — use search.

Honest provenance: generated on 2026-09-03 from AI-assisted analysis of the linked records. See how records are made.