You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description lsp_servers and lsp_diagnostics tools incorrectly report that TypeScript LSP is not installed on Windows, even though LSP server is successfully running in the background.
Environment Information
OS: Windows 11
Node.js: v22.13.0 (via nvm4w)
npm global path: C:\nvm4w\nodejs
OpenCode version: 1.1.42 (latest)
Project: NestJS backend with TypeScript 5.9.3
Problem
Evidence of LSP Working (from logs)
When running opencode debug lsp diagnostics "src/main.ts" --print-logs --log-level DEBUG, logs show:
INFO ... service=lsp.server tsserver=F:\Code\Projects\xiaofupo\WalletPro\backend\node_modules\typescript\lib\tsserver.js typescript server
INFO ... service=lsp.serverID=typescript spawned lsp server
INFO ... service=lsp.client serverID=typescript starting client
INFO ... service=lsp.client serverID=typescript initialized
INFO ... service=bus type=lsp.client.diagnostics unsubscribing{}
This proves that:
✅ LSP server successfully spawns
✅ LSP client successfully initializes
✅ Diagnostics are returned (empty object {} = no errors)
✅ LSP server properly shuts down
Tools Report Incorrect Status
Despite the above evidence: lsp_servers output:
typescript not installed - .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts lsp_diagnostics output:
Error: LSP server 'typescript' is configured but NOT INSTALLED.
Command not found: typescript-language-server
To install:
npm install -g typescript-language-server typescript
This is clearly incorrect as LSP is running and functioning.
Steps to Reproduce
Navigate to a project directory containing .ts files (e.g., backend/)
Description
lsp_serversandlsp_diagnosticstools incorrectly report that TypeScript LSP is not installed on Windows, even though LSP server is successfully running in the background.Environment Information
C:\nvm4w\nodejsProblem
Evidence of LSP Working (from logs)
When running
opencode debug lsp diagnostics "src/main.ts" --print-logs --log-level DEBUG, logs show:INFO ... service=lsp.server tsserver=F:\Code\Projects\xiaofupo\WalletPro\backend\node_modules\typescript\lib\tsserver.js typescript server
INFO ... service=lsp.serverID=typescript spawned lsp server
INFO ... service=lsp.client serverID=typescript starting client
INFO ... service=lsp.client serverID=typescript initialized
INFO ... service=bus type=lsp.client.diagnostics unsubscribing{}
This proves that:
{}= no errors)Tools Report Incorrect Status
Despite the above evidence:
lsp_servers output:
typescript not installed - .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts
lsp_diagnostics output:
Error: LSP server 'typescript' is configured but NOT INSTALLED.
Command not found: typescript-language-server
To install:
npm install -g typescript-language-server typescript
This is clearly incorrect as LSP is running and functioning.
Steps to Reproduce
.tsfiles (e.g.,backend/)opencode debug lsp diagnostics "src/main.ts" --print-logs --log-level DEBUGlsp_servers→ showstypescript [not installed]lsp_diagnostics <file>→ reports error about command not foundExpected Behavior
lsp_serversshould showtypescript [installed]when LSP server is running.lsp_diagnosticsshould execute diagnostics without path errors.Additional Context
typescriptdependency inpackage.jsontypescript-language-serverinnode_modules(v5.1.3)opencode debug lsp diagnostics