Bower: EACCES: permission denied .config/configstore/bower-github.json

Created on 20 Apr 2016  路  51Comments  路  Source: bower/bower

I keep running into this problem. I uninstalled and reinstalled bower. Nothing is working.

`alexlaw$ bower
/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^

Error: EACCES: permission denied, open '/Users/alexlaw/.config/configstore/bower-github.json'
You don't have access to this file.

at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at Object.create.all.get (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)`

Most helpful comment

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

All 51 comments

Did you see this issue: https://github.com/bower/bower/issues/2260
Does it work for you too?

I'm still getting the same error, even after
sudo bower install --allow-root
sudo bower install <package>

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

Strange but still a problem with permissions (as also indicated by the error).
Closing for now.

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

works for me

Worked for me as well

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

Worked for me :)

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

This helped me - thanks!

Worked for me :)

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

Worked for me too.

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

Worked for me too.

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

and me

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

Same goes for me

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

Worked for me as well

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

Thanks to all
worked for me .

Perfect .. thanks @alexlaw17
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Thanks to all
worked for me .

in Ubuntu 14 LTS / DigitalOcean:

sudo chown -R $USER:$GROUP /usr/share/nginx/html/

checkout a good tutorial:
https://www.digitalocean.com/community/tutorials/how-to-manage-front-end-javascript-and-css-dependencies-with-bower-on-ubuntu-14-04

Great!!! Been with this issue for days! Worked for me too!

Worked for me, thank you @alexlaw17

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

Worked for me, thanks!!!

Worked for me too. Thanks @alexlaw17. :)

Worked for me as well

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

But I needed to execute the follow too:
sudo chown -R $USER:$GROUP ~/.cache

Worked for me as well

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

Worked for me :)

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

Thanks @alexlaw17

worked for me as well! :)

fixed it with

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

Same here, thanks!

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

Worked! thanks

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

Thank you, thank you. I had gone crazy trying to restart and uninstall and then I found these commands and IT WORKS <3

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

work like charm, thanks

thank you! It works
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Finally! It works! Thanks!

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

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

worked for me too, Thanks!

The root cause of this issue (and many like it) is https://github.com/npm/write-file-atomic/issues/11.

There is an outstanding patch which will fix this for everyone. We're all waiting for someone from npm to accept it: https://github.com/npm/write-file-atomic/pull/13

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

Worked for me too!

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

Worked for me too, on OSX EL Capitan

Thank you so much!

thanks.. Its working.. on OSX EL Capitan

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

Worked for me!

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

Works for me too !!!!! Thanks !!!

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

Works for me too !!!!! Thanks !!!

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

Works for me too !!!!! Thanks !!!

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

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

Worked like a charm! Thanks a ton!

Works for me!

Thanks...

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

Worked for me, I got into this issue running

sudo bower install

by mistake, which messed it all up. But then running

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

fixed it all for me.

Thank you @alexlaw17 :)

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

It worked like magic

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

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

Work for me in ionic Framework Great!!

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

this worked for me as well. :)

@appssunset
Good call...
This is the one I needed:
sudo chown -R $USER:$GROUP ~/.cache

@alexlaw17 - Thanks man!

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

Worked liked magic.

Was this page helpful?
0 / 5 - 0 ratings