Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Failed to install Biome binary on WSL, Could not find Biome 1.9.4 for your platform. #404

Open
2 of 3 tasks
okineadev opened this issue Oct 20, 2024 · 6 comments
Open
2 of 3 tasks
Labels

Comments

@okineadev
Copy link
Contributor

VS Code version

1.95.0-insider

Extension version

v2024.10.131712 (pre-release)

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

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:

Linux Vivobook 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce

  1. A popup pops up and asks if I want to install Biome globally
  2. I click "Install Biome" (somehow it says so)
  3. I choose the right version (1.9.4 latest)
  4. And the error "Could not find Biome 1.9.4 for your platform."

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

2024-10-20 07:30:27.974 [info] Biome extension 2024.10.131712 activated
2024-10-20 07:30:29.102 [error] Could not find the Biome binary
2024-10-20 07:30:39.450 [error] Failed to start Biome extension
2024-10-20 07:30:39.450 [info] Biome extension started
2024-10-20 07:30:39.451 [info] User-facing commands registered
2024-10-20 07:30:39.451 [info] Started listening for lockfile changes
2024-10-20 07:30:39.451 [info] Started listening for configuration changes
2024-10-20 07:30:39.451 [info] Started listening for active text editor changes
2024-10-20 07:35:26.183 [error] Could not find the Biome binary
2024-10-20 07:35:31.948 [error] Failed to start Biome extension
2024-10-20 07:35:31.948 [info] Biome extension restarted
@okineadev
Copy link
Contributor Author

@nhedger

@nhedger
Copy link
Member

nhedger commented Oct 20, 2024

@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.

@Lemonnnnnnnnnnn
Copy link

Lemonnnnnnnnnnn commented Oct 21, 2024

this issue happened on my computer too, this is my environment:

  • wsl distro : Ubuntu 24.04 LTS
  • packages management: pnpm

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"]} .

@Lemonnnnnnnnnnn
Copy link

Lemonnnnnnnnnnn commented Oct 21, 2024

I checked the related issue #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 biomejs/biome#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 npm/rfcs#438 (comment) , both packages be installed is not a expected behavior, and this problem is been solved since [email protected] npm/rfcs#438 (comment) .

@okineadev
Copy link
Contributor Author

Fixed by reinstalling Windows

@okineadev
Copy link
Contributor Author

I'm not joking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants