Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 EPERM: operation not permitted node_modules\@biomejs\cli-win32-x64\biome.exe #8

Closed
1 task done
MakakWasTaken opened this issue Nov 14, 2023 · 6 comments · Fixed by #7
Closed
1 task done
Labels
Bug confirmed Report has been confirmed as a valid bug

Comments

@MakakWasTaken
Copy link
Contributor

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
@ematipico
Copy link
Member

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.

@nstepien
Copy link
Contributor

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?

@nhedger
Copy link
Member

nhedger commented Nov 15, 2023

Here's my current understanding of the issue.

  • It happens on Windows
  • It happens at least with yarn and npm, 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.

@SuperchupuDev
Copy link
Member

SuperchupuDev commented Nov 15, 2023

happens to me using pnpm as well

@nstepien
Copy link
Contributor

FWIW you can just try deleting node_modules and you'll get an error, it's not tied to package managers.

@nhedger
Copy link
Member

nhedger commented Nov 15, 2023

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.

@nhedger nhedger transferred this issue from biomejs/biome Nov 16, 2023
@nhedger nhedger added the Bug confirmed Report has been confirmed as a valid bug label Nov 19, 2023
@nhedger nhedger linked a pull request Nov 20, 2023 that will close this issue
@nhedger nhedger closed this as completed in #7 Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug confirmed Report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants