Fix Unhandled rejection Error: EACCES: permission denied

I was trying to install gulp on my mac.

But I was getting following errors while running command sudo npm install gulp -g

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/bhargav/.npm/_cacache/....'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/bhargav/.npm/_cacache/....'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bhargav/.npm/_logs/2019-02-05T14_33_58_146Z-debug.log

After a lot of findings from StackOverflow, I found the following solution for that.

You have to run following two commands and that’s it.

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

 

Related Articles

Fun @ WordCamp Pune

In my previous blog First WordCamp, I covered what we have done in WordCamp. Now in this blog, you will know what fun we did…

WordCamp Mumbai

Whooaaaaaaaaa…!!!!!!!!!!!! Mumbaaaaaaaaiiiiiiiiiiiiiiiii…………………………………… Mayanagari…….. This was my 2nd WordCamp and it was at Mumbai. This WordCamp was like medicine for me as I had some problems…

Errors were encountered while processing:

[code language=”css”] dpkg: error processing package mariadb-server (–configure): dependency problems – leaving unconfigured Processing triggers for libc-bin (2.23-0ubuntu7) … No apport report written because the…

Fix 404 error on nginx

Sometimes you get unexpected 404 error from Nginx server. And I am going to tell you how I fixed the issue. You can fix that…

Install wp-cli on windows

WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multisite installs and much more, without using a web browser.

So I am going to tell you short, simple and easy way that how to use wp-cli on windows system.

Responses

Leave a Reply