TypeScript LSP plugin fails on Windows: uv_spawn cannot execute npm .cmd wrappers

Resolved 💬 2 comments Opened Mar 9, 2026 by vampiricwulf Closed Mar 14, 2026

Description

The typescript-lsp@claude-plugins-official plugin fails on Windows because uv_spawn cannot execute npm's global install wrappers (.cmd/shell scripts). The error is:

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

Environment

  • Windows 11 Pro 10.0.26200
  • Claude Code (latest)
  • typescript-language-server v5.1.3 (installed globally via npm install -g typescript-language-server typescript)
  • Node.js installed, npm global bin (C:\Users\<user>\AppData\Roaming\npm) is on Windows PATH

Root Cause

npm global installs on Windows create shell/cmd wrappers, not native .exe files:

typescript-language-server      # #!/bin/sh script
typescript-language-server.cmd  # @ECHO off batch script
typescript-language-server.ps1  # PowerShell script

Node.js child_process.spawn (via libuv's uv_spawn) on Windows cannot directly execute these wrappers — it needs either a native .exe or to spawn via cmd.exe /c.

The gopls-lsp plugin works fine because Go compiles to a native .exe.

Steps to Reproduce

  1. Install typescript-language-server globally: npm install -g typescript-language-server typescript
  2. Verify it's on PATH: where typescript-language-server works from cmd.exe
  3. Enable typescript-lsp@claude-plugins-official plugin
  4. Open a .js file and attempt any LSP operation

Expected Behavior

The TypeScript LSP plugin should work on Windows, similar to how the gopls plugin works.

Suggested Fix

Use child_process.spawn with { shell: true } option, or explicitly resolve .cmd wrappers on Windows when spawning LSP servers.

View original on GitHub ↗

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