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

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)`

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 9
  • Comments: 51 (2 by maintainers)

Most upvoted comments

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

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

works for me

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

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

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 😃

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

Worked for me as well

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