bower / bower

A package manager for the web
bower.io
MIT License
14.99k stars 1.85k forks source link

fail in bower install #696

Closed alizdavoodi closed 10 years ago

alizdavoodi commented 10 years ago

when use bower install this Error show up !

bower EACCES EACCES, unlink '/Users/alireza/.cache/bower/registry/bower.herokuapp.com/lookup/angular'

Stack trace: Error: EACCES, unlink '/Users/alireza/.cache/bower/registry/bower.herokuapp.com/lookup/angular'

Console trace: Trace at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:69:17) at Logger.updateNotifier.packageName (/usr/local/lib/node_modules/bower/bin/bower:113: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:25:16 at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:713:24) at /usr/local/lib/node_modules/bower/node_modules/q/q.js:739:30 at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:979:31) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:661:41) at /usr/local/lib/node_modules/bower/node_modules/q/q.js:543:44

System info: Bower version: 1.0.3 Node version: 0.10.15 OS: Darwin 12.4.0 x64

denchistyakov commented 10 years ago

Got the same error, try versions 1.0.1-1.0.3, all failed, finished sucessfull only with 1.0.0

…
bower                                       error Didn't get expected byte count expect: 22 actual: 43

Stack trace:
FileReader._getStream (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/fstream/lib/file-reader.js:66:10)
EventEmitter.emit (events.js:93:17)
afterRead (fs.js:1330:12)
fs.read.callback (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/graceful-fs/polyfills.js:207:17)
Object.wrapper [as oncomplete] (fs.js:362:17)

Console trace:
Trace
    at StandardRenderer.error (/home/dench/www/browser-mobile/static/node_modules/bower/lib/renderers/StandardRenderer.js:69:17)
    at Logger.<anonymous> (/home/dench/www/browser-mobile/static/node_modules/bower/bin/bower:113:18)
    at Logger.EventEmitter.emit (events.js:96:17)
    at Logger.emit (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /home/dench/www/browser-mobile/static/node_modules/bower/lib/commands/install.js:25:16
    at _rejected (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/q/q.js:713:24)
    at Promise.then.self.promiseDispatch.threw (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/q/q.js:739:30)
    at Promise.when (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/q/q.js:979:31)
    at Promise.promise.promiseDispatch (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/q/q.js:661:41)
    at messages (/home/dench/www/browser-mobile/static/node_modules/bower/node_modules/q/q.js:543:44)

System info:
Bower version: 1.0.3
Node version: 0.8.23
OS: Linux 3.0.4-2-lxcna x64
satazor commented 10 years ago

@denchistyakov The errors are different, please create a new issue for your problem, perhaps with the bower.json you have.

@alirezaDavid This sounds like permission issue. Did you used bower with sudo before? Checkout the mode/owner of the folder it's trying to delete.

denchistyakov commented 10 years ago

Tnx André, open https://github.com/bower/bower/issues/699

alizdavoodi commented 10 years ago

@denchistyakov yes , i try with sudo but do not solved and one more thing in bower 1.0.3 we cant use sudo !

satazor commented 10 years ago

@alirezaDavid I mean, you should not use sudo with bower and I've asked if you used it before 1.0.3. If you do, please do a sudo bower cache clean --allow-root or remove/correct folders manually and try again.

alizdavoodi commented 10 years ago

@satazor tnx a lot :) sudo bower cache clean --allow-root this is work sry about my english ;)

denchistyakov commented 10 years ago

Sorry, but i did'nt use sudo, this log from process of building debian's package witch running under fakeroot user, and i can't change this. If i understand you correct, i must execute bower cache clean --allow-root and only after it bower install --allow-root under root user yep?

mishanga commented 10 years ago

:+1: same thing in 1.0.x

pib0t commented 10 years ago

try sudo npm install -g bower

caa commented 10 years ago

I had this same issue caused by permissions. I cleared the cache manually in /home/USER/.cache/bower and chmod'ed the destination directories. Thanks @satazor!

osalama7 commented 8 years ago

Fixed a similar issue using bower clean cache and running chown -R /pathtofolder on paths that result errors along the way of installing bower packages

Artadys commented 7 years ago

I have the same error You cannot use the new command inside an ember-cli project.

my ember-cli: 2.6.1 node: 4.4.5 os: darwin x64

walwyde commented 2 years ago

it says bower: command not found. after running $ sudo bower cache clean --allow-root.. please help!

walwyde commented 2 years ago

try sudo npm install -g bower

THIS IS A PERFECT SOLUTION, THANKS A LOT. I MEAN ONE TOUCH......