Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EACCES Error with Bower install?

I've read a few answers on StackOverflow & some other sites but none seem to fix the issue I'm having.

I'm installing AppGyver Add-ons, via terminal. Getting the following error:

BradMacBookPro:SparksInSpain breadadams$ bower install https://##MY-DOWNLOAD-CODE##@addons.appgyver.com/steroids-addons.js?version=3.1.0 --save bower not-cached    https://##MY-DOWNLOAD-CODE##@addons.appgyver.com/steroids-addons.js?version=3.1.0#* bower resolve       https://##MY-DOWNLOAD-CODE##@addons.appgyver.com/steroids-addons.js?version=3.1.0#* bower download      https://##MY-DOWNLOAD-CODE##@addons.appgyver.com/steroids-addons.js?version=3.1.0 bower EACCES        EACCES, mkdir '/Users/breadadams/.cache/bower/packages/7480e059b318750565b4b25c2556c9c4'  Stack trace: Error: EACCES, mkdir '/Users/breadadams/.cache/bower/packages/7480e059b318750565b4b25c2556c9c4'  Console trace: Trace     at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)     at Logger.updateNotifier.packageName (/usr/local/lib/node_modules/bower/bin/bower:109:18)     at Logger.EventEmitter.emit (events.js:95:17)     at Logger.emit (/usr/local/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)     at /usr/local/lib/node_modules/bower/lib/commands/install.js:27:16     at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:808:24)     at /usr/local/lib/node_modules/bower/node_modules/q/q.js:834:30     at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:1079:31)     at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:752:41)     at /usr/local/lib/node_modules/bower/node_modules/q/q.js:574:44  System info: Bower version: 1.2.8 Node version: 0.10.25 OS: Darwin 13.1.0 x64 

I'm not sudo, I've tried --allow-root, cleaned the bower cache, always get the same error on install. Some local permission problem?

like image 573
Brad Adams Avatar asked Mar 07 '14 18:03

Brad Adams


People also ask

How do I fix npm install error?

If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).


2 Answers

I had a similar issue that I couldn't resolve using these suggestions. I was successful when I ran Bower with root privileges, like so:

sudo bower install --allow-root 
like image 108
JoelPrz Avatar answered Oct 13 '22 11:10

JoelPrz


Change the ownership for the .config and cache directory

sudo chown -R username:username ~/.config  

and

sudo chown -R username:username ~/.cache 
like image 32
Kannan S Avatar answered Oct 13 '22 13:10

Kannan S