Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bower install fails giving me EACCES: permission denied error

Tags:

npm

macos

bower

I get the following error below when running npm install -g bower.

Node version v6.2.0 npm version 3.9.3 OSX Yosemite

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

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

at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502: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:541:32)
at Object.Module._extensions..js (module.js:550:10)
like image 820
Eugene Avatar asked Dec 15 '22 06:12

Eugene


1 Answers

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

Reference:

Github - EACCES: permission denied (closed issue)

like image 125
Asiddeen bn Muhammad Avatar answered Feb 12 '23 10:02

Asiddeen bn Muhammad