LSP tool fails to spawn typescript-language-server on Windows (missing .cmd extension)
Resolved 💬 3 comments Opened Mar 12, 2026 by FaustoMendezcom Closed Mar 12, 2026
Bug Description
The LSP tool fails on Windows when trying to spawn typescript-language-server because it doesn't append the .cmd extension. On Windows, npm global installs create .cmd wrapper scripts, so the binary must be invoked as typescript-language-server.cmd (or spawned with shell: true).
Steps to Reproduce
- Install
typescript-language-serverglobally on Windows:npm install -g typescript-language-server - Verify it exists:
where typescript-language-server.cmd→C:\Users\...\AppData\Roaming\npm\typescript-language-server.cmd - Use the LSP tool on any
.ts/.tsxfile (e.g.,documentSymboloperation)
Expected Behavior
The LSP tool should find and spawn typescript-language-server.cmd on Windows.
Actual Behavior
Error performing documentSymbol: ENOENT: no such file or directory, uv_spawn 'typescript-language-server'
The tool tries to spawn typescript-language-server (without .cmd), which doesn't exist on Windows.
Suggested Fix
When spawning LSP server processes on Windows, either:
- Use
shell: truein thespawn/execFileoptions (Node.js will resolve.cmdautomatically), or - Append
.cmdto the executable name onwin32platform
Environment
- OS: Windows 11 Pro 10.0.26200
- Platform: win32
- Shell: bash (Git Bash)
- typescript-language-server location:
C:\Users\FM\AppData\Roaming\npm\typescript-language-server.cmd
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗