LSP plugins fail on Windows with "spawn ENOENT" error
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?
## Description
TypeScript and Pyright LSP plugins fail to start on Windows with spawn ENOENT errors, even when the language servers are installed and accessible in PATH.
## Environment
- OS: Windows 11 (MINGW64/Git Bash)
- Claude Code version: [run
claude --version] - Node.js version: [run
node --version]
## Steps to Reproduce
- Install typescript-language-server globally:
npm install -g typescript-language-server typescript - Verify it's in PATH:
where typescript-language-server(returns valid path) - Enable
typescript-lsp@claude-plugins-officialplugin - Run
/doctor
## Expected Behavior
TypeScript LSP starts successfully and provides code intelligence.
## Actual Behavior
[Warning] [typescript] spawn typescript-language-server ENOENT
## Root Cause (suspected)
On Windows, npm global installs create .cmd wrapper scripts. When spawning processes programmatically, Windows requires cmd /c wrapper to execute these scripts properly.
This was already identified and fixed for the Playwright MCP server configuration (see .mcp.json needing cmd /c npx instead of just npx).
## Workaround
Disable the LSP plugins at project level via .claude/settings.json.
What Should Happen?
TypeScript LSP starts successfully and provides code intelligence.
Error Messages/Logs
[Warning] [typescript] spawn typescript-language-server ENOENT
Steps to Reproduce
- Install typescript-language-server globally: npm install -g typescript-language-server typescript
- Verify it's in PATH: where typescript-language-server (returns valid path)
- Enable typescript-lsp@claude-plugins-official plugin
- Run /doctor
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
● You're on 2.1.19.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Windows 11 (Git Bash / MINGW64)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗