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
{{ message }}
Repository navigation
ESLint LSP server fails to auto-install on Windows #6365
The ESLint LSP server fails to auto-install and start on Windows. Even though ESLint is installed in the project and the configuration is correct, the LSP server doesn't work automatically.
Root Causes
After investigating the source code, I found several Windows-specific issues:
On Windows, npm is actually npm.cmd (a batch file wrapper). Bun's shell may not correctly resolve these commands, causing the ESLint server installation to fail silently.
Fix: Use npm.cmd on Windows or use Bun's spawn with explicit path resolution.
The ESLint implementation doesn't follow this pattern for npm commands.
Environment
OS: Windows 10/11
OpenCode version: Latest
Project: Next.js with ESLint 9.x configured
Expected Behavior
When a project has eslint as a dependency and TypeScript/JavaScript files are opened, the ESLint LSP server should automatically download, compile, and start providing diagnostics.
Actual Behavior
The ESLint LSP server fails silently. No lint diagnostics are shown, and the server doesn't start.
Proposed Fix
// In server.ts ESLint.spawn()constnpmCmd=process.platform==="win32" ? "npm.cmd" : "npm"await$\`${npmCmd}install\`.cwd(finalPath).quiet()await$\`${npmCmd}runcompile\`.cwd(finalPath).quiet()// Remove or replace the V8 flagconstproc=spawn(BunProc.which(),[serverPath,"--stdio"],{cwd: root,env: {
...process.env,BUN_BE_BUN: "1",},})
Activity
fix(lsp): use npm.cmd on Windows for ESLint LSP installation
github-actions commentedon Dec 29, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.