biome-vscode: 🐛 Biome not detected in dependencies
VS Code version
1.91.1
Extension version
2.3.0
Biome version
1.8.3
Operating system
- Windows
- macOS
- Linux
Description
I see this popup, and don’t get any linting from Biome, even though I have Biome in my project’s devDependencies in package.json
Steps to reproduce
- Add
"@biomejs/biome": "1.8.3",todevDependencies - Install the Biome extension
- Reload the window
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 33 (26 by maintainers)
Same problem in a yarn 3.2.2 monorepo. In the root package.json is a devDependency for @biomejs/biome v1.9.4
But I always get the message
Could not find Biome in your dependencies. Either add the @biomejs/biome package to your dependencies, or download the Biome binary.Formatter does not work after I click OK. At the moment only the biome cli is working for me.
I am confused. Is this a bug?, Did I miss something? Or will this only work after https://github.com/biomejs/biome/issues/2228 is implemented?
hello guys, any1 got a fix for this?
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:
We’ll make sure to add a command that does this in the next version.
I’m trying to make a repro for this because it’s really irritating.
I realised that in this instance, it was in fact not the extension specifically, but that biome was indeed not properly installed.
I think that what happened was that when merging changes that involve changes to
package-lock.json, I removed it and recreated it by runningnpm iagain and committing that version - but this has a different result than the originalnpm install --save-dev --save-exact @biomejs/biome… Having re-run that, it seems to be improved.The above also worked for me - but I find it less than ideal that this necessary. I don’t think there’s anything particularly complex about my project from a biome perspective (using npm, not a monorepo…)
Sure thing - here it is @nhedger https://github.com/tylerlaprade/biome_bug
Happy to try and reproduce it if you can provide a minimal reproduction repo with these settings.
Also, FWIW, I’m not seeing the
Biome 1.8.3anymore. This just spins forever.Sure, how’s this: https://www.loom.com/share/708aae2faab4444b8a31caf6e0931ba3?sid=833839d4-f0d1-49f3-a8e7-6667ac0782f4
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.projectssetting.Try adding the following to your
${workspaceFolder}/.vscode/settings.jsonfile:@ematipico, I still have this “bundled” thing showing after clearing versions cache. My teammate is also getting the constant popup warning as well.