Open okineadev opened 2 days ago
@nhedger
@nhedger
I'd appreciate it if you could refrain from pinging me directly when I haven't yet interacted with an issue. I'll get to it when I have time.
this issue happened on my computer too, this is my environment:
I found a possible reason is that the platformIdentifier variable of this extenstion does not match the biomejs downloaded binary package.
export const platformIdentifier = (() => {
// On Linux, we always use the `musl` flavor because it has the advantage of
// having been built statically. This is meant to improve the compatibility
// with various systems such as NixOS, which handle dynamically linked
// binaries differently.
const flavor = process.platform === "linux" ? "-musl" : "";
return `${process.platform}-${process.arch}${flavor}`;
})();
The platformIdentifier always points to "linux-x64-musl" if the platform equals "linux", but pnpm downloads the "@biomejs/cli-linux-x64" package on the Ubuntu based on the it's package.json config: {"libc": ["glibc"]} .
I checked the related issue https://github.com/biomejs/biome-vscode/issues/295 , the use of "musl" is look like expected. Maybe this problem should be handled in the main repository rather than here?
I also checked the related merge record https://github.com/biomejs/biome/pull/1067 , it added musl support and mentioned that both musl and gnu binaries will be installed under npm:
on linux with npm it will install both @biomejs/cli-linux-${arch} and @biomejs/cli-linux-${arch}-musl, since npm will install based on arch and platform (which is linux for both packages).
So why npm only install one package in my linux machine(it's also reproduction in my debian machine with npm, not wsl with pnpm)? according the discussion in npm https://github.com/npm/rfcs/issues/438#issuecomment-1877571800 , both packages be installed is not a expected behavior, and this problem is been solved since npm@10.4.0 https://github.com/npm/rfcs/issues/438#issuecomment-1909015354 .
VS Code version
1.95.0-insider
Extension version
v2024.10.131712 (pre-release)
Biome version
1.9.4
Operating system
Description
I can't install Biome globally because it keeps giving me the error "Could not find Biome 1.9.4 for your platform."
My System Information:
Ubuntu 24.04 on WSL2 on Windows 11 Pro (24H4)
uname -a
output:Steps to reproduce
Expected behavior
I have installed Biome globally and am happily using it
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
No response
Logs