pnpm / pnpm

Fast, disk space efficient package manager
https://pnpm.io
MIT License
28.66k stars 959 forks source link

EBUSY: resource busy or locked and EPERM: operation not permitted on windows #8111

Open ahaoboy opened 2 months ago

ahaoboy commented 2 months ago

Verify latest release

pnpm version

9.1.2

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI, Operating System (Windows, MacOS, Linux)

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

First install pnpm using the installation script, then install pnpm using pnpm

pwsh

iwr https://get.pnpm.io/install.ps1 -useb | iex
pnpm i esbuild  -g
esbuild --version

pnpm i pnpm -g
pnpm i esbuild  -g
esbuild --version

msys

curl -fsSL https://get.pnpm.io/install.sh | sh -
pnpm i esbuild  -g
esbuild --version

pnpm i pnpm -g
pnpm i esbuild  -g
esbuild --version

Describe the Bug

After installing pnpm using pnpm, although installing other packages globally will report an error, the installed packages can be used

pwsh

I run the script using the same windows terminal

PS C:\wt> pnpm i @mpv-easy/mpsm -g
Already up to date
Progress: resolved 1, reused 0, downloaded 0, added 0, done
 WARN  The target bin directory already contains an exe called pnpm, so removing C:\Users\Ace\AppData\Local\pnpm\pnpm.EXE
 EPERM  EPERM: operation not permitted, unlink 'C:\Users\Ace\AppData\Local\pnpm\pnpm.EXE'

msys

pnpm i pnpm -g
Nothing to stop. No server is running for the store at C:\Users\Ace\AppData\Local\pnpm\store\v3
Packages: +1
+
Progress: resolved 2, reused 2, downloaded 0, added 0, done
 WARN  The target bin directory already contains an exe called pnpm, so removing C:\Users\Ace\AppData\Local\pnpm\pnpm.EXE
 EBUSY  EBUSY: resource busy or locked, open 'C:\Users\Ace\AppData\Local\pnpm\pnpm'

Expected Behavior

no error

Which Node.js version are you using?

v22.2.0

Which operating systems have you used?

If your OS is a Linux based, which one it is? (Include the version if relevant)

win11

QC2168 commented 3 weeks ago

Did you solve it? I met it, too.

ahaoboy commented 3 weeks ago

Sadly, no It seems to just output annoying messages and does not affect the correct operation of the function image

Did you solve it?