Skip to content

Conversation

@fraineralex
Copy link
Contributor

Summary

  • Use npm.cmd instead of npm on Windows for running install and compile commands during ESLint LSP server installation
  • Remove invalid --max-old-space-size V8 flag (Bun uses JavaScriptCore, not V8)

Problem

On Windows, npm is actually npm.cmd (a batch file wrapper). Bun's shell may not correctly resolve bare npm commands, causing the ESLint server installation to fail silently.

Additionally, the --max-old-space-size=8192 flag is a V8/Node.js flag, but Bun uses JavaScriptCore. This flag is ignored or could cause unexpected behavior.

Solution

const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm"
await $`${npmCmd} install`.cwd(finalPath).quiet()
await $`${npmCmd} run compile`.cwd(finalPath).quiet()

This follows the same pattern used by other LSP implementations in the codebase (e.g., Oxlint at line 232-234).

Fixes #6365

- Use npm.cmd instead of npm on Windows for running install and compile commands
- Remove invalid --max-old-space-size V8 flag (Bun uses JavaScriptCore, not V8)

Fixes anomalyco#6365
@rekram1-node rekram1-node merged commit 337681d into anomalyco:dev Dec 29, 2025
2 checks passed
ariane-emory pushed a commit to ariane-emory/opencode that referenced this pull request Dec 29, 2025
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
v1truv1us pushed a commit to v1truv1us/opencode that referenced this pull request Dec 29, 2025
hk9890 pushed a commit to hk9890/opencode that referenced this pull request Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint LSP server fails to auto-install on Windows

2 participants