bower / bower

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

ENOENT after 1.2.8 update #991

Closed wilkerlucio closed 10 years ago

wilkerlucio commented 10 years ago

hi, since the last update I'm getting this error when trying to install my packages:

bower chosen.jquery#*           cached https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#e-tag:3faf39b4e
bower chosen.jquery#*         validate e-tag:3faf39b4e against https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#*
bower angular#v1.2.0-rc.2       cached git://github.com/angular/bower-angular.git#1.2.0-rc.2
bower angular#v1.2.0-rc.2     validate 1.2.0-rc.2 against git://github.com/angular/bower-angular.git#v1.2.0-rc.2
bower jquery#~2.0.3             cached git://github.com/components/jquery.git#2.0.3
bower jquery#~2.0.3           validate 2.0.3 against git://github.com/components/jquery.git#~2.0.3
bower bootstrap#~3.0.0          cached git://github.com/twbs/bootstrap.git#3.0.2
bower bootstrap#~3.0.0        validate 3.0.2 against git://github.com/twbs/bootstrap.git#~3.0.0
bower jquery#>= 1.9.0           cached git://github.com/components/jquery.git#2.0.3
bower jquery#>= 1.9.0         validate 2.0.3 against git://github.com/components/jquery.git#>= 1.9.0
bower chosen.jquery#*              new version for https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#*
bower chosen.jquery#*          resolve https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#*
bower chosen.jquery#*         download https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip
bower chosen.jquery#*          extract chosen_v1.0.0.zip
bower chosen.jquery#*           ENOENT ENOENT, open '/var/folders/nb/m18105410nz_xkx4qkd98h_c0000gn/T/wilkerlucio/bower/chosen.jquery-46279-SZy2v5/docsupport/'

Stack trace:
Error: ENOENT, open '/var/folders/nb/m18105410nz_xkx4qkd98h_c0000gn/T/wilkerlucio/bower/chosen.jquery-46279-SZy2v5/docsupport/'

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.21
OS: Darwin 13.0.0 x64
jdhiro commented 10 years ago

This is driving me mad, deploying to Heroku. None of the above workaround seem to solve the problem consistently for me.

cuongdd2 commented 10 years ago

My workaround is installing bower 1.2.6 with nodejs 0.8.26. Hope it helps.

jdhiro commented 10 years ago

Here's a little snapshot of my failure:

       bower bootstrap#~3.0.3                              resolved git://github.com/twbs/bootstrap.git#3.0.3
       bower angular#1.2.14-build.2290+sha.0b6ba9c           ENOENT ENOENT, lstat '/app/.cache/bower/packages/ef2188def21eb1bbd1f1792311942a53/1.2.14-build.2290%2Bsha.0b6ba9c/angular.min.js.gzip'

       Stack trace:
       /tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/fstream/lib/writer.js:284:26
       Object.oncomplete (fs.js:107:15)

       Console trace:
       Trace
           at StandardRenderer.error (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)
           at Logger.updateNotifier.packageName (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/bin/bower:109:18)
           at Logger.EventEmitter.emit (events.js:95:17)
           at Logger.emit (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
           at /tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/lib/commands/install.js:27:16
           at _rejected (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/q/q.js:808:24)
           at /tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/q/q.js:834:30
           at Promise.when (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/q/q.js:1079:31)
           at Promise.promise.promiseDispatch (/tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/q/q.js:752:41)
           at /tmp/build_5fa914f3-5101-4586-abad-334302896feb/node_modules/bower/node_modules/q/q.js:574:44
jdhiro commented 10 years ago

@yjaaidi ok it looks like that works for me, at least at least on one run. Isn't that more or less just disabling the cache though?

AnthonySteele commented 10 years ago

Despite what I said earlier, we are still seeing intermittent issues on our CI server. If you are saying "looks like that works for me, and I ran it once" you are fooling yourself.

jdhiro commented 10 years ago

I'm not sure how reporting I had some successful runs is fooling myself? There is still a problem to be fixed here IMO.

HNygard commented 10 years ago

My experience was that if you run bower 2 times without clearing the cache you will not get this error since the second time will just hit the bower cache. I was able to reproduce the error on my local machine by cleaning the caches + installed bower packages.

We have a nightly clean job in Jenkins that removes all caches (gradle, bower, npm, etc) and starts with a blank workspace. When we downgraded from 1.2.8 to 1.2.6 it started working during the day, but failed when running in during the night. Must be some other caches and/or conditions that impacts the build.

AnthonySteele commented 10 years ago

jdhiro: Maybe you have found a permanent fix. I thought that I had too. Point is, you can't actually tell "on one run". I agree, there is still a problem to be fixed here.

knalli commented 10 years ago

Since I'm running my patched version of bower, the daily random build errors do not happen again. I'm actually dislike that, but I do not want to investigate the build errors any more.

I'm still waiting for a final resolution.

wulfsberg commented 10 years ago

I am somewhat confused about the status of this issue. It is closed, apparently as "fixed if you update decompress-zip", yet that doesn't change anything for me, nor apparently for a lot of other people. Should this be opened as an issue against decompress-zip 0.0.4?

mhaligowski commented 10 years ago

Is this already fixed? I just ran across similiar problem on Travis (https://travis-ci.org/mhaligowski/fishkees-ui/builds/19689872) and it's driving me crazy. When it's not fixed, why it's closed?

TheBox193 commented 10 years ago

+1 @yjaaidi creating the .bowerrc file to define alternate temp and storage directories worked for me. Must be a permissions issue for the default on my windows pc. Thanks--

anthonator commented 10 years ago

@yjaaidi @jdhiro Your solution worked for me on Heroku as well.

almost commented 10 years ago

Thanks @yjaaidi, your solution worked for me on Heroku with the latest version of Bower

AnthonySteele commented 10 years ago

This fix https://github.com/bower/bower/issues/991#issuecomment-34857639 does not work reliably for me. It is clearly doing something as the error message changes to show a different folder. I have checked that the Teamcity CI user has full permissions to that folder, so this is not a permissions issue.

For reference, a sample error is now:

[14:13:23][Step 4/5] bower angular#1.2.15-build.2364+sha.7c34e1f            
    EPERM EPERM, rename 'C:\BuildAgent\work\abcd13841cf0f666\client\.bower-cache\efab88def21eb1bbd1f1792311942a53\1.2.15-build.2364+sha.7c34e1f'
[14:13:23][Step 4/5] Process exited with code 1
[14:13:23][Step 4/5] Step bower install (Command Line) failed
ssimpo commented 10 years ago

This error is driving me nuts, I have tried all of the above fixes. I have cleared the cache, uninstalled, re-installed and even manually re-installed decompress-zip. I have also, tried changing the cache directories to local as suggested and running with/without a primed cache. None seem to work when trying install angular in a Windows7 project.

jacqueslareau commented 10 years ago

They closed this issue. I don't think they care. This is weird since it's failing consistently. We should open a new issue.

jacqueslareau commented 10 years ago

Probably related to #1125

knalli commented 10 years ago

Yeah, we should do this. However, I don't want to troll the party cloning closed issues.

On topic, same for me: since I'm running a patched version, I have no issues any more. Before that, I was faced nearly every day.

benschwarz commented 10 years ago

If you're still seeing this issue:

Have you cleared the cache? bower cache clean Uninstalled bower? Reinstalled bower?

knalli commented 10 years ago

Yep, all of this. But additionally, I'm using actually a local bower (via package.json => every time reinstalled) and overridden bower settings file defining a local bower temp directory.

This is actually a duplicate of #933, I was confused myself with the numbers, too much ticket numbers nowadays, sorry about that.

We had already pointed out several weeks ago (https://github.com/bower/bower/issues/933#issuecomment-33399162) that this is a timing issue in bower internals. I'm still wondering why there is neither discussion about PRs & solutions nor the problem.

jacqueslareau commented 10 years ago

Many many times. Also deleted .bower-tmp, .bower-registry and .bower-cache.

On Tue, Mar 4, 2014 at 3:42 PM, Ben Schwarz notifications@github.comwrote:

If you're still seeing this issue:

Have you cleared the cache? bower cache clean Uninstalled bower? Reinstalled bower?

Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/991#issuecomment-36671591 .

mhaligowski commented 10 years ago

anyone tried this? https://github.com/bower/bower/pull/1077

vjpr commented 10 years ago

Modifying .bowerrc as suggested earlier fixed it for me after trying pretty much everything else.

CMCDragonkai commented 10 years ago

Gettings this aswell

bower EPERM         EPERM, unlink 'C:\Users\CMCDRA~1\AppData\Local\Temp\Dragoon-Tablet-CMCDragonkai\bower\angular-sanitize-876-W0v5OV\archive.tar.gz'

Stack trace:
Error: EPERM, unlink 'C:\Users\CMCDRA~1\AppData\Local\Temp\Dragoon-Tablet-CMCDragonkai\bower\angular-sanitize-876-W0v5OV\archive.tar.gz'

Console trace:
Trace
    at StandardRenderer.error (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\lib\renderers\StandardRenderer.js:72:17)
    at Logger.<anonymous> (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\bin\bower:111:22)
    at Logger.EventEmitter.emit (events.js:95:17)
    at Logger.emit (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\bower-logger\lib\Logger.js:29:39)
    at C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\lib\commands\update.js:24:16
    at _rejected (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:797:24)
    at C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:823:30
    at Promise.when (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:1035:31)
    at Promise.promise.promiseDispatch (C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:741:41)
    at C:\Users\CMCDragonkai\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:557:44

System info:
Bower version: 1.3.3
Node version: 0.10.12
OS: Windows_NT 6.2.9200 x64
j-kim commented 10 years ago

I am getting the same error as above as well. I was getting the EPERM with renaming, but with the most recent update i see the EPERM with unlinking. It is odd though because it is not a consistent error. (i.e. Day 1, got the error literally all day. Day 2, got the error only once the entire day).

Windows 7 x64 Bower 1.3.3 Node v0.10.26 NPM 1.4.3