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
fix(lsp): biome bunx fallback runs the unrelated biome npm package instead of @biomejs/biome #133
When neither node_modules/.bin/biome nor a biome on PATH is found, BiomeServer.spawn falls back to:
spawn('bunx',['biome','lsp-proxy','--stdio'],…)
(packages/lsp/src/server/biome.ts:75)
bunx biome resolves the npm package named biome. That is not Biome. Biome is published as @biomejs/biome. The unscoped biome package is an unrelated project ("A simple way to manage environment variables on a per-project basis", latest 0.3.3), and it also ships a biome bin:
Package
Latest
bin
biome
0.3.3
biome: ./dist/index.js
@biomejs/biome
2.6.2
biome: bin/biome
So on a machine without Biome installed, the fallback downloads and runs an unrelated third-party package with lsp-proxy --stdio. The Biome language server never starts. Instead, the LSP client gets a process that does not speak LSP. The warning in the catch block already says the right package (npm install @biomejs/biome), but the spawn itself uses the wrong one.
Expected
The fallback runs the real Biome CLI. For example:
Pin the version, the way the TypeScript fallback pins typescript-language-server@4.3.3 since #131. That keeps the fallback reproducible, and stops it from reusing whatever the bare name resolves to.
Notes
spawn from node:child_process reports a missing command through the async error event; it does not throw synchronously. So the catch around the bunx fallback, and its install hint, effectively never run. The fix may want to log the hint some other way.
Activity
fix(lsp): run a pinned @biomejs/biome in the biome bunx fallback (#134)