[Windows] TypeScript LSP issues: ENOENT spawn error and non-functional LSP operations

Resolved 💬 3 comments Opened Feb 4, 2026 by AsysKevin Closed Feb 4, 2026

Environment

  • Claude Code Version: 2.1.31
  • OS: Windows 11 (Build 10.0.26200.7628)
  • Node.js: v22.20.0
  • npm: 10.9.3

Summary

Two related TypeScript LSP issues on Windows platform:

  1. ENOENT Error: 2. LSP Operations Not Working: Most LSP operations return no results even when the server is running

---

Issue 1: spawn typescript-language-server ENOENT

Description

On Windows, attempting to use LSP features results in:

\

Root Cause

This is a Windows-specific issue:

  1. When npm installs global packages on Windows, it creates \ batch wrapper scripts (e.g., \) instead of \ executables
  2. Node.js's \ function, without \ option, only looks for actual executables (\)
  3. Therefore, when Claude Code attempts to execute \, it cannot find the file, resulting in ENOENT error

Suggested Fix

When spawning \ on Windows, either:

  • Use \ option in - Or explicitly look for \ files on Windows platform

---

Issue 2: LSP Operations Return No Results

Description

Even when the TypeScript LSP server is running (confirmed via Task Manager showing \ process), most LSP operations fail to return results on Windows.

Reproduction Steps

  1. Open a TypeScript project on Windows
  2. Try various LSP operations on a valid \ file

Test Results Comparison

| Operation | macOS | Windows |
|-----------|-------|---------|
| \ | ✅ Works | ✅ Works |
| \ | ✅ Works | ❌ "No symbols found" |
| \ | ✅ Works | ❌ "No definition found" |
| \ | ✅ Works | ⚠️ No output |
| \ | ✅ Works | ❌ "No references found" |
| \ | ✅ Works | ❌ "No definition found" |
| \ | ✅ Works | ❌ "No call hierarchy item found" |
| \ | ✅ Works | ❌ "No call hierarchy item found" |

Observations

  • \ is the only operation that works correctly on Windows
  • The LSP server process (\) is confirmed running
  • The project has valid \ and \ installed
  • Same project works perfectly on macOS

Possible Causes

  1. Path format issues: Windows uses backslashes (\) while LSP may expect forward slashes (\)
  2. Working directory resolution: Project root identification may differ on Windows
  3. TypeScript project initialization: LSP may not properly load \ on Windows
  4. File URI handling: Windows file URIs may not be correctly formatted

---

Additional Context

Tested on the same codebase (MidwayJS TypeScript project) on both macOS and Windows. The issue is reproducible and consistent on Windows.

View original on GitHub ↗

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