LSP plugins fail on Windows with "spawn ENOENT" error

Resolved 💬 3 comments Opened Jan 26, 2026 by cgluttrell Closed Jan 30, 2026

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

  1. Install typescript-language-server globally: npm install -g typescript-language-server typescript
  2. Verify it's in PATH: where typescript-language-server (returns valid path)
  3. Enable typescript-lsp@claude-plugins-official plugin
  4. 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

  1. Install typescript-language-server globally: npm install -g typescript-language-server typescript
  2. Verify it's in PATH: where typescript-language-server (returns valid path)
  3. Enable typescript-lsp@claude-plugins-official plugin
  4. 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗