Jump to content

Biome: Difference between revisions

From NixOS Wiki
Troubleshooting: Dynamic linking error in Biome LSP
 
Pigs (talk | contribs)
m Add category and beginning statement
 
Line 1: Line 1:
[https://github.com/biomejs/biome Biome] is a fast formatter and performant linter for [[JavaScript]], TypeScript, JSX, JSON, CSS and GraphQL.
== Troubleshooting ==
== Troubleshooting ==


Line 54: Line 56:


Reference for similar issues: [https://stackoverflow.com/a/78215911/27134695 Stack Overflow]
Reference for similar issues: [https://stackoverflow.com/a/78215911/27134695 Stack Overflow]
[[Category:JavaScript]]

Latest revision as of 21:14, 10 June 2025

Biome is a fast formatter and performant linter for JavaScript, TypeScript, JSX, JSON, CSS and GraphQL.

Troubleshooting

Issue: Biome LSP in Neovim failed on NixOS due to dynamic linking error.

Logged in /home/incogshift/.local/state/nvim/lsp.log:

[ERROR] Could not start dynamically linked executable [...] NixOS cannot run dynamically linked executables intended for generic\nlinux environments out of the box [...]

Fix

Edit: ~/.local/share/nvim/mason/bin/biome

Look for a section like this:

const PLATFORMS = {
	...
	darwin: {
		x64: "@biomejs/cli-darwin-x64/biome",
		arm64: "@biomejs/cli-darwin-arm64/biome",
	},
	linux: {
		x64: "@biomejs/cli-linux-x64/biome",
		arm64: "@biomejs/cli-linux-arm64/biome",
	},
	...
};

Replace the architecture path of your OS with the absolute path to biome in your system. Find it using:

$ which biome
/etc/profiles/per-user/<user>/bin/biome

Then update the block (assuming x64 Linux as the platform):

const PLATFORMS = {
	...
	darwin: {
		x64: "@biomejs/cli-darwin-x64/biome",
		arm64: "@biomejs/cli-darwin-arm64/biome",
	},
	linux: {
		x64: "/etc/profiles/per-user/<user>/bin/biome",
		arm64: "@biomejs/cli-linux-arm64/biome",
	},
	...
};

Reference for similar issues: Stack Overflow