Skip to content

🐛 NPM install blocked by biome plugin #203

@tiwe-ppi

Description

@tiwe-ppi

IDE and version

IntelliJ IDEA 2025.1.3 (Ultimate Edition)

Extension version

1.10.0

Biome version

2.1.2

Operating system

  • Windows
  • macOS
  • Linux

Description

When the biome plugin is running I get an error if I run npm install when this operation would change the biome (npm dependency) version.

"C:\Program Files\nodejs\npm.cmd" install
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     'C:\\path\\to\\project\\node_modules\\@biomejs\\.cli-win32-x64-BQ85DrI0',
npm warn cleanup     [Error: EPERM: operation not permitted, unlink 'C:\path\to\project\node_modules\@biomejs\.cli-win32-x64-BQ85DrI0\biome.exe'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'unlink',
npm warn cleanup       path: 'C:\\path\\to\\project\\node_modules\\@biomejs\\.cli-win32-x64-BQ85DrI0\\biome.exe'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]

Makes sense because that version is in use by the plugin. But I wonder if you could do something about that on the plugin side. We maintain multiple versions of our software and have to checkout branches of older releases quite often. This often means we have to run npm install to get the correct dependencies for that version. When we update biome we usually just do it on our main branch so this actually happens quite often. And having to turn off the plugin for that is "suboptimal".

Steps to reproduce

  1. Open a project with and older biome version, for example 2.1.0 or add biome 2.1.0 to an open project.
  2. Enable biome plugin
  3. Edit package.json, change the biome version to the latest (tested with 2.1.2)
  4. Run npm install, for example via the context menu

Expected behavior

Running the plugin should not interfere with NPM install. I don't know what the best solution for this problem is. Maybe copy the biome executable to a temp folder and run it from there?

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs triageThe issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions