error hub
Recurring ENOENT errors
A graph-derived KFA hub for recurring ENOENT evidence across distinct public record types.
Common Problems
- [Docker/WSL on Windows checkouts] '/bin/bash^M: bad interpreter' or misleading 'exec /usr/local/bin/entrypoint.sh: no such file or directory' — CRLF shebang from core.autocrlf
Cause (Documented platform behavior): The shebang becomes '#!/bin/bash\r'; the kernel looks for an interpreter literally named 'bash\r' which does not exist, so exec reports ENOENT against the script path. Fix status: documented_behavior Workaround (not a fix): Convert the file to LF in the editor or run dos2unix/sed d
- [VS Code Remote] Extension throws "ENOENT: no such file or directory, open '/root/.config/Code/User/..." when running remotely — ~/.config/Code does not exist on the server
Cause (Documented platform behavior): The remote server does not create ~/.config/Code; extensions should use context.globalStorageUri / context.storageUri. Fix status: documented_behavior Limitations: - Doc source uses Liquid placeholders ({% data variables.product.prodname_vscode_shortname %}); verbatim check done ag
- Missing executable is reported on the ChildProcess error event
When child_process.spawn receives a command that cannot be resolved, the call can return a ChildProcess before the failure is delivered. Attach an error listener immediately and handle error code ENOENT; do not rely only on synchronous exceptions or the close event.
- MCP stdio servers on Windows fail with 'spawn npx ENOENT' (or 'spawn EINVAL' for .cmd) — Node can't spawn npx.cmd without a shell; wrap with cmd /c
Cause: on Windows, `npx` is `npx.cmd`, a batch shim, not a native executable. Node's `child_process.spawn("npx", ...)` looks for a file named exactly `npx` on PATH — it only resolves `.cmd`/`.bat` via PATHEXT when `shell: true` (or `shell: 'cmd.exe'`) is set, or when given the explicit `.cmd` filename — so it finds not
- How should ENOENT distinguish a missing executable from a missing working directory?
## Question How should ENOENT distinguish a missing executable from a missing working directory? ## Why this matters Recurring public developer task for HTTP and integration errors. ## Environment / product HTTP and integration errors ## What needs to be determined Current researched guidance, applicability, limitation
- How should an MCP stdio client diagnose spawn npx ENOENT?
## Question How should an MCP stdio client diagnose spawn npx ENOENT? ## Why this matters Recurring public developer task for MCP. ## Environment / product MCP ## What needs to be determined Current researched guidance, applicability, limitations, and primary sources for this question. Researched guidance is proposed,
- [Claude Code] 'The current directory no longer exists (it was deleted or moved)' — started from a removed worktree/temp dir (pre-v2.1.239: raw 'ENOENT ... uv_cwd' crash)
Cause (Documented platform behavior): Process cannot read its working directory. Fix status: released_fix (fixed in v2.1.239 (clear message)) Other error fragments: - error: The current working directory was deleted, so that command didn't work. Please cd into a different directory and try again. - Can't read the curre
- MCP TypeScript client custom env removes PATH and causes spawn npx ENOENT
## Problem - MCP TypeScript client custom env removes PATH and causes spawn npx ENOENT ## Observed symptom - The stdio connection works without env overrides and fails with spawn npx ENOENT when a custom env is supplied. - Observed in 1 reviewed public artifact; this is not a claim that only that many reports exist. ##
- spawn npx ENOENT in a desktop MCP client while the terminal works
## Problem - spawn npx ENOENT in a desktop MCP client while the terminal works ## Observed symptom - A desktop editor/client reports spawn npx ENOENT, but npx resolves in an interactive terminal. - Observed in 3 reviewed public artifacts; this is not a claim that only that many reports exist. ## Exact error or signatur
- Claude Desktop cannot resolve npx installed through a shell version manager
## Problem - Claude Desktop cannot resolve npx installed through a shell version manager ## Observed symptom - npx works in fish/zsh, but Claude Desktop reports spawn npx ENOENT for npm MCP servers. - Observed in 2 reviewed public artifacts; this is not a claim that only that many reports exist. ## Exact error or signa
- VS Code remote MCP host cannot find npx that exists on the local machine
## Problem - VS Code remote MCP host cannot find npx that exists on the local machine ## Observed symptom - An MCP server starts or resolves locally, but the Remote/WSL/Dev Container/SSH extension host reports ENOENT or launches in the wrong place. - Observed in 3 reviewed public artifacts; this is not a claim that onl
- Bare npx command fails to launch MCP servers on Windows
## Problem - Bare npx command fails to launch MCP servers on Windows ## Observed symptom - A Windows MCP host reports spawn npx ENOENT or EINVAL while a shell or explicit Node executable can start the server. - Observed in 4 reviewed public artifacts; this is not a claim that only that many reports exist. ## Exact erro
Solutions with evidence
- Proposed fix: [Claude Code] 'The current directory no longer exists (it was deleted or moved)' — started from a removed worktree/temp dir (pre-v2.1.239: raw 'ENOENT ... uv_cwd' crash)
Recommended action: cd to an existing directory; if recreated at the same path, run cd "$PWD"; for macOS EPERM grant Files and Folders access to the terminal. Option: Re-enter a valid directory [evidence: official_recommended_action] Applies when: Any Steps: 1. cd "$PWD" or cd to project root 2. rerun claude Expected:
- Researched guidance: How should an MCP stdio client diagnose spawn npx ENOENT?
## Summary Treat MCP stdio `spawn npx ENOENT` as an ambiguous process-creation failure: the configured `npx` may be unresolvable in the launching process environment, or the requested working directory may be absent. Diagnose both in the same sanitized runtime context before changing the MCP command. ## Candidate actio
- [Candidate / unverified] Solution for 7ace9724-4c60-44f2-ac8d-dc62bad1ab1d: For acceptance, invoke a known-available runtime with a deterministic marker; tr
## Support semantics This is a **candidate / unverified** Solution from the KFA Solution Factory Tier-2 gate. It is source-grounded research material, not an Outcome, and does **not** claim independent reproduction or confirmed field success. ## Cause Node.js documents ENOENT when the command does not exist after spawn
- Proposed fix: [VS Code Remote] Extension throws "ENOENT: no such file or directory, open '/root/.config/Code/User/..." when running remotely — ~/.config/Code does not exist on the server
Recommended action: Extension authors: use context.globalStorageUri or context.storageUri. Users: report to the extension; as a stopgap creating the directory may unblock it (not documented). Option: Use globalStorageUri/storageUri instead of hard-coded paths [evidence: official_recommended_action] Applies when: Extens
- Researched guidance: How should ENOENT distinguish a missing executable from a missing working directory?
## Summary Node.js child_process documents the same ENOENT for a missing command and a nonexistent cwd; the error text may name the command even when cwd is the cause. Distinguish them with a bounded, post-failure inspection of the exact cwd and executable resolution, while treating the result as diagnostic rather than
- On Windows, launch npx-based MCP servers via cmd /c (or an absolute npx.cmd / node.exe path)
spawn npx ENOENT is Windows failing to run the npx.cmd shim without a shell. Wrap the command in cmd /c (or use absolute paths).
- [Candidate / unverified] Solution for 80127d75-c3ea-4257-a43e-c68e92ffcf2b: Attach a ChildProcess error listener immediately after spawn and handle error.co
## Support semantics This is a **candidate / unverified** Solution from the KFA Solution Factory Tier-2 gate. It is source-grounded research material, not an Outcome, and does **not** claim independent reproduction or confirmed field success. ## Cause Node.js documents ENOENT when the command does not exist and that th