You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm ERR! Error: EPERM: operation not permitted only on windows #8072
For our dependency, Dash.js 5.0, we need to use Node 20.18.0, so npm 10.8.2 was installed with this Node version. However, when we run npm install on Windows, we encounter the error: ERR! Error: EPERM: operation not permitted, while it works fine on Mac.
Could you please assist us in fixing this issue with npm 10.8.2?
Expected Behavior
npm install works fine on windows as Mac
Steps To Reproduce
In this environment : Windows
With this config...
Run : run npm install
See error : npm ERR! Error: EPERM: operation not permitted only on windows
@testeur-990 Based on the report It's hard to determine the cause of the issue but generally with windows if this occurs then you can try removing node_modules and reinstalling your dependency
Hello @milaninfy ,
We tried what was mentioned and many other solutions we found, but we still have an issue with npm 10.8.2. I believe you can easily reproduce it by trying Node 20.18.0 with npm 10.8.2 on Windows (no issue on Mac).
For now, we have switched to Node 20.0.0, which uses npm 9.6.4, and it worked fine. We hope you can help us use npm 10.x.
This job started failing randomly on Windows only after merging another branch. I tried several different versions of npm, downgrading some recently updated dependencies, but going back to 9.x doesn't seem to fix things for me... I'm tired of fighting it, and pnpm install seems to just work, so plan on going that route for now.
After so many trial and errors this chatgpt response saved my life. If it works for you i'll be more than happy.
If you're experiencing errors like cb.apply is not a function, EPERM: operation not permitted, or The "file" argument must be of type string, follow this guide to fully reset your Node.js & npm setup using nvm-windows.
Activity
milaninfy commentedon Feb 4, 2025
@testeur-990 Based on the report It's hard to determine the cause of the issue but generally with windows if this occurs then you can try removing node_modules and reinstalling your dependency
testeur-990 commentedon Feb 5, 2025
Hello @milaninfy ,
We tried what was mentioned and many other solutions we found, but we still have an issue with npm 10.8.2. I believe you can easily reproduce it by trying Node 20.18.0 with npm 10.8.2 on Windows (no issue on Mac).
For now, we have switched to Node 20.0.0, which uses npm 9.6.4, and it worked fine. We hope you can help us use npm 10.x.
Thank you
Gerrit0 commentedon Feb 23, 2025
I suspect I'm seeing the same issue here -- https://github.com/TypeStrong/typedoc/actions/runs/13469139132
This job started failing randomly on Windows only after merging another branch. I tried several different versions of npm, downgrading some recently updated dependencies, but going back to 9.x doesn't seem to fix things for me... I'm tired of fighting it, and
pnpm installseems to just work, so plan on going that route for now.pranay-dutta commentedon Jun 7, 2025
After so many trial and errors this chatgpt response saved my life. If it works for you i'll be more than happy.
If you're experiencing errors like
cb.apply is not a function,EPERM: operation not permitted, orThe "file" argument must be of type string, follow this guide to fully reset your Node.js & npm setup usingnvm-windows.Step 1: Uninstall Existing Node.js
Remove-Item -Recurse -Force "$env:ProgramFiles\nodejs" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:AppData\npm" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:AppData\npm-cache" -ErrorAction SilentlyContinue
Step 2: Install
nvm-windowsDownload the latest version from:
👉 https://github.com/coreybutler/nvm-windows/releases/latest
Run the downloaded
nvm-setup.exefile.Step 3: Install Node.js 20 (LTS - Recommended)
Open PowerShell as Administrator, then run:
nvm install 20
nvm use 20
Verify Installation
node -v # Should show: v20.x.x
npm -v # Should show: 9.x or 10.x