Npm install error EPERM Operation not permitted

无人久伴 提交于 2019-12-05 16:25:17

I had the same issue. After cache clean and updating npm everything is ok. So try to run:

npm cache clean --force

npm install -g npm@latest

There are 2 solutions for this

  1. you can run "npm cache clean"
  2. you run the command prompt in admin mode.

Try below setps, hope this helps.

  • Update Node.js

  • npm cache clean command in Command prompt, try as admin

check node proxy settings if persist remove them with below

npm config delete http-proxy
npm config delete https-proxy

Install by yourself the module that is giving the error.

After spending many hours and trying all the possible suggestions, I found that installing the specific module mentioned by the error globally fixed the issue:

For Example: npm ERR! { Error: EPERM: operation not permitted, unlink 'Path\Docume nts\AngularProjects\my-sample-app333\node_modules.staging@angular\core-a3d1aa4 8\ bundles\core.umd.js

I run: npm install -global @angular/core

and it fixed it for me! Finally!!

Just try npm cache clean quick and simple :)

I tried everything above but it did not work for me.
I copied all content of package.json and deleted the file. Then, I created a new file and copied all there and I saved it as package.json
That fixed everything

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!