[BUG] LSP spawn fails on Windows (ENOENT) for intelephense and typescript-language-server, but not pyright
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
On Windows 11 with PowerShell, enabling multiple LSPs causes intelephense and typescript-language-server to fail with the following error:
Error performing hover: ENOENT: no such file or directory, uv_spawn 'typescript-language-server'
The same error occurs for intelephense. Only pyright works correctly.
Environment:
- OS: Windows 11
- Shell: PowerShell
- Claude Code: v2.1.143
- Node.js: v24.12.0
LSP configuration:
php-lsp→intelephense(npm global)typescript-lsp→typescript-language-server(npm global)python-lsp→pyright(npm global)
On Windows, npm installs CLI tools as .cmd wrappers (e.g. typescript-language-server.cmd) rather than native executables. Node's uv_spawn cannot resolve .cmd files unless shell: true is set or the .cmd extension is explicitly included. Pyright appears to work because it ships with a different executable shim.
What Should Happen?
Claude Code should successfully spawn npm-installed LSP servers on Windows without requiring users to manually specify .cmd extensions. When running on win32, the spawn logic should either resolve the full .cmd path via where, append .cmd automatically if the bare executable is not found, or use shell: true for LSP process spawning.
Error Messages/Logs
Steps to Reproduce
- Install
intelephenseandtypescript-language-serverglobally via npm - Enable
php-lspandtypescript-lspin Claude Code settings - Open a PHP or TypeScript file and trigger any LSP feature (e.g. hover)
Error appears immediately.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.143
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗