claude-code - 💡(How to fix) Fix [BUG] LSP spawn fails on Windows (ENOENT) for intelephense and typescript-language-server, but not pyright

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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.

Error Messages/Logs

Error appears immediately.

Root Cause

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.

Code Example

Error performing hover: ENOENT: no such file or directory, uv_spawn 'typescript-language-server'

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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-lspintelephense (npm global)
  • typescript-lsptypescript-language-server (npm global)
  • python-lsppyright (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

  1. Install intelephense and typescript-language-server globally via npm
  2. Enable php-lsp and typescript-lsp in Claude Code settings
  3. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING