This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
Error: EPERM: operation not permitted on npm 5.4 on windows #18380
Closed
Description
I'm opening this issue because:
- npm is crashing.
What's going wrong?
I've updated to npm5.4 (from 5.3) and fresh npm i (without node_modules, package-lock.json and cleared cache) throws this error:
npm ERR! path C:\Data\Dropbox\repo\blowfish\node_modules\fsevents\node_modules\abbrev\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Data\Dropbox\repo\blowfish\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Data\Dropbox\repo\blowfish\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Data\\Dropbox\\repo\\blowfish\\node_modules\\fsevents\\node_modules\\abbrev\\package.json\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Data\\Dropbox\\repo\\blowfish\\node_modules\\fsevents\\node_modules\\abbrev\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
How can the CLI team reproduce the problem?
Here's my dependencies:
{
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.0"
}
}
Run npm i
on Windows.
supporting information:
npm -v
prints: 5.4.0node -v
prints: 8.4.0npm config get registry
prints: https://registry.npmjs.org/- Windows, OS X/macOS, or Linux?: Windows 10
- Network issues: no
Activity
test: workaround npm issues
pvdlg commentedon Sep 2, 2017
Same issue here:
https://ci.appveyor.com/project/vanduynslagerp/karma-rollup-preprocessor/build/138
https://ci.appveyor.com/project/vanduynslagerp/karma-jasmine-jquery/build/87
https://ci.appveyor.com/project/vanduynslagerp/karma-postcss-preprocessor/build/40
juansev commentedon Sep 2, 2017
i am having the same problem on Windows 10, Node 6.3.1 NPM 5.4 . I have rollbacked to 5.3 and it works
DominikLevitsky commentedon Sep 2, 2017
same
Tsury commentedon Sep 2, 2017
same
Zbyl commentedon Sep 3, 2017
I had the same issue when trying "npm install --save hammerjs" (and some other packages too!).
In my case package.json file mentioned in the error (for me it was \node_modules\fsevents\node_modules\ansi-regex\package.json) was not present in the system.
I have added an empty file with this name and it got further - to next similar error.
It turned out that all directories under fsevents\node_modules (few dozens of them) are empty!
Definitely some bug in npm.
I didn't know what to do with that, so I removed node_modules folder in project directory and run npm install again. This went well.
So I tried "npm install --save hammerjs" again, but I got the same errors all over.
npm -v
5.4.0
node -v
v8.4.0
I was running in command prompt as Administrator. Previously I was running that in non-admin cmd and had the same error.
Error message and debug logs in attachments,
logs.zip
I have uninstalled node (and npm).
I have also deleted C:\Users\Skowron\AppData\Roaming\npm and C:\Users\Skowron\AppData\Roaming\npm-cache.
I deleted node_modules folder in project directory.
I have reinstalled node 8.4.0 (which comes with npm 5.3.0).
After that "npm install --save hammerjs" worked.
Instead of errors with non-existing files in fsevents folder it simply printed this warning:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents)
valakhosravi commentedon Sep 3, 2017
same
shravan2x commentedon Sep 3, 2017
This issue appears to only occur with specific packages,
babel-loader
is one of them.jschumme commentedon Sep 3, 2017
confirm Windows 10
inestyne commentedon Sep 3, 2017
same
inestyne commentedon Sep 3, 2017
temporary fix, downgrade npm to 5.3
npm install npm@5.3 -g
LMS007 commentedon Sep 3, 2017
I have the issue on my Heroku Dyno, so it's an issue in Linux too
oleonardo commentedon Sep 3, 2017
+1
unigazer commentedon Sep 3, 2017
I had nothing but problems since
npm v5
came out. I am not able to installelectron
,create-react-app
,create-react-native-app
usingnpm v5
, just because of the permission issue even though I tried to install those modules throughroot
/Administrator
.However, if I were to install
npm v4.6.1
everything works flawlessly.MiLL10N commentedon Sep 4, 2017
same
94 remaining items