๐ EPERM: operation not permitted node_modules\@biomejs\cli-win32-x64\biome.exe
Closed this issue ยท 6 comments
Environment information
CLI:
Version: 1.3.1
Color support: true
Platform:
CPU Architecture: x86_64
OS: windows
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: unset
JS_RUNTIME_VERSION: "v18.18.2"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "npm/10.0.0"
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: true
Workspace:
Open Documents: 0
What happened?
I am getting an unexpected error when trying to install current/new packages using yarn. The problem happens when running the vs code extension while doing this. I suspect that this might because the VSCode extension depends on the installed version of biome in node_modules.
The error is as follows:
error An unexpected error occurred: "EPERM: operation not permitted, unlink '[...]\\node_modules\\@biomejs\\cli-win32-x64\\biome.exe'".
Workaround:
- Close VSCode
- Open Powershell or other cmd
- Install packages using the new cmd
Expected result
It should not throw an error when trying to install the packages.
Code of Conduct
- I agree to follow Biome's Code of Conduct
This seems to be an error related to yarn
, I'm not sure if we might be able to do something from our end to avoid this issue.
This happens with npm
as well, for example when running npm ci
.
It's a limitation with Windows, as long as the .exe is running it cannot be deleted.
I don't know if there are ways around it. Maybe the vscode extension could copy the .exe in a temporary location?
Here's my current understanding of the issue.
- It happens on Windows
- It happens at least with
yarn
andnpm
, but maybe with other package managers. - It happens when upgrading the
@biomejs/biome
package, which in turn upgrades@biomejs/cli-win32-x64
, while it is already running in VS Code
I will try to reproduce the issue on a Windows machine.
happens to me using pnpm as well
FWIW you can just try deleting node_modules
and you'll get an error, it's not tied to package managers.
Indeed, I was able to reproduce.
Not sure if this qualifies as a bug per se, but it's definitely an annoyance, so I'll dig more into this.