{"record":{"id":"7ba1256a1862b95e","repo":"denoland/deno","slug":"path-not-found-entry-missing","errorCode":null,"errorMessage":"path not found (entry missing): {}","messagePattern":"path not found \\(entry missing\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/rt/file_system.rs","lineNumber":1306,"sourceCode":"                std::io::ErrorKind::NotFound,\n                format!(\"path not found (symlink not dir): {}\", path.display()),\n              ));\n            }\n          }\n        }\n        _ => {\n          return Err(std::io::Error::new(\n            std::io::ErrorKind::NotFound,\n            format!(\"path not found (not dir): {}\", path.display()),\n          ));\n        }\n      };\n      let component = component.to_string_lossy();\n      current_entry = current_dir\n        .entries\n        .get_by_name(&component, case_sensitivity)\n        .ok_or_else(|| {\n          std::io::Error::new(\n            std::io::ErrorKind::NotFound,\n            format!(\"path not found (entry missing): {}\", path.display()),\n          )\n        })?\n        .as_ref();\n    }\n\n    Ok((final_path, current_entry))\n  }\n}\n\npub struct FileBackedVfsFile {\n  file: VirtualFile,\n  pos: RefCell<u64>,\n  vfs: Arc<FileBackedVfs>,\n}\n\nimpl FileBackedVfsFile {","sourceCodeStart":1288,"sourceCodeEnd":1324,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/rt/file_system.rs#L1288-L1324","documentation":"Same embedded-VFS traversal, but the parent directory was reached successfully and the failure is in the final `entries.get_by_name(&component, case_sensitivity)` lookup: no entry with that exact name (honoring the configured case sensitivity) exists in that directory. It is the VFS equivalent of a plain \"file not found\" and is returned as `io::ErrorKind::NotFound` with the hint \"(entry missing)\".","triggerScenarios":"Opening or stat-ing a path that was never embedded into the compiled binary: assets referenced only through runtime-computed strings (e.g. `./config/${env}.json`), wrong letter casing on a case-sensitive VFS (Linux default), or a file added to the repo after the binary was compiled.","commonSituations":"`deno compile` embeds only statically analyzable imports, so dynamically built paths are missing at runtime; developing on Windows/macOS (case-insensitive lookups succeed) then deploying to Linux (case-sensitive fails); running a stale binary after adding new asset files.","solutions":["Recompile with explicit `--include` globs covering every runtime-computed asset path (e.g. `deno compile --include=\"./config/**\" -A main.ts`).","Compare the exact casing of every path segment against the source tree — the embedded VFS is case-sensitive on Linux targets.","Verify the path is inside the compile root; paths outside the VFS root fall back to the real filesystem and follow a different error path."],"exampleFix":"# before\n$ deno compile -A main.ts   # asset loaded at runtime via `./config/${env}.json` → entry missing\n\n# after\n$ deno compile -A --include=\"./config/**\" main.ts","handlingStrategy":"try-catch","validationCode":"// fail fast at startup for dynamically-built asset paths\nconst required = [`./config/${Deno.env.get(\"ENV\")}.json`, \"./data.bin\"];\nfor (const p of required) {\n  await Deno.stat(p); // surfaces missing VFS entries immediately with the path\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await Deno.readTextFile(p);\n} catch (err) {\n  if (err instanceof Deno.errors.NotFound) {\n    return null; // missing embedded asset — degrade or recompile\n  }\n  throw err;\n}","preventionTips":["Pass --include globs to deno compile for every runtime-computed path","Match path casing exactly — the embedded VFS is case-sensitive on Linux targets","Rebuild the binary whenever assets change; stale binaries miss entries","Run the compiled binary (not just deno run) in CI"],"tags":["vfs","standalone-binary","deno-compile","asset-not-embedded","case-sensitivity","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}