Closed tylerlaprade closed 2 weeks ago
Thank you @tylerlaprade for opening the issue. Would you mind sharing a reproduction?
@ematipico, once I clicked Download Biome
, I'm not getting it anymore, but that is just a band-aid fix. I tried deleting all "Biome" files on my computer in order to repro, but it's still globally installed somewhere. (Not on the command line, so I can't which biome
).
To repro, any node project should suffice with Biome in devDependencies
.
Sorry @tylerlaprade, but I use Biome myself in other Node.js. projects, and I don't experience this issue, it's possible that it's something related to your project or your machine. That's why we ask for a minimal, reproducible reproduction
Sure, makes sense. In that case, what's the best way for me to uninstall Biome from wherever that button put it? I can't find it in file search.
@tylerlaprade There's a command palette for that Biome: clear versions cache
@ematipico, I still have this "bundled" thing showing after clearing versions cache. My teammate is also getting the constant popup warning as well.
Ah, this might have been poor communication on my part. This command does not actually clear the downloaded versions, but we cache the request that retrieves the list of available versions from GitHub to avoid hitting the rate limit. This command is used to reset this cache.
To clear this "bundled" version, you need to delete the following folder manually:
~/Library/Application Support/Code/User/globalStorage/biomejs.biome/server
We'll make sure to add a command that does this in the next version.
I'm closing this as I believe the latest nightly fixes this issue. Let me know if it's not the case.
Thanks @nhedger. I assume you meant pre-release, as "nightly" is deprecated.
After switching to pre-release, I have a different popup, but I'm still missing Biome. I expect to have it because it's in my package.json
and I've run npm i
. Could the problem be that it's a monorepo and package.json
isn't in the root folder?
Thanks @nhedger. I assume you meant pre-release, as "nightly" is deprecated. After switching to pre-release, I have a different popup, but I'm still missing Biome. I expect to have it because it's in my
package.json
and I've runnpm i
. Could the problem be that it's a monorepo andpackage.json
isn't in the root folder?
Hey, sorry I sometimes use the terms interchangeably since we deprecated the actual nightly version, but you're correct I meant the pre-release.
As for the extension not detecting Biome, I believe it is indeed because you're in a monorepo. The extension will try to find Biome at in the Project, which happens to be the root of your workspace folder by default. You can explicitly declare projects with the biome.projects
setting.
Try adding the following to your ${workspaceFolder}/.vscode/settings.json
file:
{
"biome.projects": [
{ "path": "/path/to/the/subfolder" }
]
}
@nhedger, hmm, that's still not working, both with and without a slash at the end of the path. I'm in a monorepo, but with only one relevant project - the back-end is in Python. So I have biome.jsonc
in my workspace root, but package.json
and node_modules/
are in the subfolder. I confirmed that node_modules/
contains @biomejs
.
Would you mind providing a minimal reproduction repo? I'll have a look!
Sure! I was able to repro without a monorepo. https://github.com/tylerlaprade/biome_bug Steps:
npm i
to install BiomeDeveloper: Reload Window
to see the error triggerI can't seem to reproduce. The global session seems to error, and I'll have to investigate that, but the LSP session for the project at /
seems to be created correctly.
Could I trouble you for a screen recording?
Thanks, I think I found the issue.
When the extension boots, it creates a global LSP session and a project-specific LSP session. I believe the popup you see is triggered by the global LSP session starting because a global Biome cannot be found on your system. When you install Biome in your node_modules and restart VS Code, it again attempts to start the global session. When you dismiss the notification, it actually boots the project-specific LSP session (you can see Biome 1.8.3 in your status bar).
I initially intended for users to download Biome on the fly using the popup so that they could start the global LSP session. However, I'm realizing now that the intent may not be obvious.
In the meantime, clicking Yes
in the popup to download Biome should solve the issue. This will download a biome binary used for the global LSP session and shouldn't prompt you anymore.
I'll have to think of a better way to signal users why they see this popup.
@nhedger, even though I see "Biome 1.8.3" in the status bar, the extension doesn't seem to be able to make use of it. I don't get formatting on save or any errors/warning squiggles in my code
Regarding clicking Yes
for the global download, I don't want my local environment to ever use a different version that what I have in CI. That would cause me to not realize my PR will fail the build until I submit it.
To be clear, the downloaded version would only be used with the global session which handles files that are not part of your project such as Untitled (unsaved) files.
Ah okay - in that case it seems like there's still a bug? The project one is not working on files that are part of my project.
Also, FWIW, I'm not seeing the Biome 1.8.3
anymore. This just spins forever.
VS Code version
1.91.1
Extension version
2.3.0
Biome version
1.8.3
Operating system
Description
I see this popup, and don't get any linting from Biome, even though I have Biome in my project's
devDependencies
inpackage.json
Steps to reproduce
"@biomejs/biome": "1.8.3",
todevDependencies
Expected behavior
Biome should detect that it's installed from
package.json
Does this issue occur when using the CLI directly?
Yes
Logs
No response