ErrLookup › Background 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
- Typo, wrong spelling, or case mismatch in the path. Many tools match paths exactly, including case (SiYuan's hPath blocktree matching, Linux path sensitivity noted by nocobase). A single wrong segment — /dat/* vs /data/*, .gemini/agent vs .gemini/agents — makes the whole lookup miss.
- Relative path resolved against the wrong working directory. CLIs resolve relative paths against the process cwd, which may differ from your shell's (claw-code's /skills install, nocobase --cwd, CI steps, npm scripts). The path exists from where you are standing but not from where the tool is running.
- Directory deleted, moved, or renamed after the path was written down. Configs and arguments referencing directories that were valid when saved — a moved checkout, a renamed plugin directory upstream, a JDK upgraded to a new install path. Everything downstream that still cites the old path fails validation.
- Path exists but is not a directory (or is the wrong kind of entry). Several tools require a directory specifically: oh-my-pi rejects file paths for plugin sources, deno fails when a symlink-to-file is treated as a directory, deepagents rejects sockets/FIFOs/device nodes, golang-migrate's iofs driver requires a directory inside the fs.FS.
- Glob or pattern that matches nothing. Hadoop's -put/-cp destinations throw when a glob like backup-* matches zero entries — note a plain non-glob missing destination is accepted, only zero-match globs fail. Brace and character-class patterns can silently match nothing.
- Broken symlink or dangling intermediate segment. Symlink resolution fails when any target in the chain is missing (beads' RootID via EvalSymlinks, Maven's -f parent check, deepagents' symlink race). readlink -f on the path exposes the break.
- Missing parent or no auto-creation of intermediates. Some operations refuse to invent parents: SiYuan does not auto-create intermediate hPath parents, Hadoop's same-disk tiering check dies when no ancestor of the data dir exists, and mkdir on the root itself has no parent to validate.
- Distributed namespace or mount-table miss. In HDFS Router operations the path may not be covered by any mount entry, may be absent from one of several downstream nameservices, or may resolve to no candidate subcluster. The local filesystem is fine; the federated mapping is the problem.
What usually fixes it
- [object Object]
- [object Object]
- [object Object]
- [object Object]
- [object Object]
- [object Object]
Documented occurrences
- parent path not found: %s (siyuan-note/siyuan)
- Could not find the following folders in Passbolt: #{missing_paths.join(", ")} (basecamp/kamal)
- Proxies destination directory '<info>%s</info>' does not exist. (doctrine/orm)
- No such file or directory (apache/hadoop)
- Invalid path: {location}: directory does not exist (apache/hadoop)
- Directory {} extracted from the -f/--file command-line argument {} does not exist (apache/maven)
- Plugin source directory does not exist: "${resolved}" (can1357/oh-my-pi)
- File not found in downstream nameservices: {} (apache/hadoop)
- Cannot find locations for {} in {} (apache/hadoop)
- Cannot find target file - {} (apache/hadoop)
- path not found (symlink not dir): {} (denoland/deno)
- identity: resolve root path: %w (gastownhall/beads)
- Project root not found: {project_root} (oraios/serena)
- {} (apache/hadoop)
- Directory does not exist: {} (apache/hadoop)
- Hook registered for hook point '{hook_point}' must have a callable 'run(state)', got an object of type '{type(h).__name__}'. (deepset-ai/haystack)
- Backup location: {$backup_root} does not exist... (getgrav/grav)
- 44: Not found: {target} (apache/hadoop)
- Project path does not exist: {} (clockworklabs/SpacetimeDB)
- Path does not exist: {path} (langchain-ai/deepagents)
…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.