close

[Fixed] npm – EPERM: operation not permitted on Windows

Today We are Going To Solve npm – EPERM: operation not permitted on Windows in Javascript. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix npm – EPERM: operation not permitted on Windows Error?

  1. How to Fix npm – EPERM: operation not permitted on Windows Error?

    To Fix npm – EPERM: operation not permitted on Windows Error just Change prefix variable. Here you can solve this error very easily. Just try the given steps: Run cmd as administrator and Run npm config edit Then justChange prefix variable to C:\Users\<User Name>\AppData\Roaming\npm By doing this your npm works well and your error will be solved. So try this method.

  2. npm – EPERM: operation not permitted on Windows

    To Fix npm – EPERM: operation not permitted on Windows Error just Give Full Control to that user. Follow the below steps: First of right click and to to the folder Then go the Properties And then go to the Security Tab And just click on Edit to change Permissions Select the user and give Full Control to that user. And your issue will be solved.

Solution 1 : Change prefix variable

Here you can solve this error very easily. Just try the given steps:

  1. Run cmd as administrator and Run npm config edit
  2. Then just Change prefix variable to C:\Users\<User Name>\AppData\Roaming\npm

By doing this your npm works well and your error will be solved. So try this method.

Solution 2 : Give Full Control to that user

Follow the below steps:

  1. First of right click and to to the folder
  2. Then go the Properties
  3. And then go to the Security Tab
  4. And just click on Edit to change Permissions
  5. Select the user and give Full Control to that user.

And your issue will be solved.

Solution 3 : Downgrade the npm version

Just downgrade the npm version to solve your error:

uninstall:

npm uninstall npm -g

And just install the previous version:

npm install [email protected] -g

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read These Solutions

Leave a Comment