Install requirejs-text failed #274

Closed
dotcypress opened this Issue Feb 24, 2013 · 26 comments

Projects

None yet

9 participants

Trace:

bower install requirejs-text
bower cloning git://github.com/requirejs/text
bower cached git://github.com/requirejs/text
bower fetching requirejs-text
bower checking out requirejs-text#2.0.5
bower copying C:\Users\Vitaly\AppData\Roaming\bower\cache\requirejs-text\42d2a6b96690909cd5680cb3d506ed56
bower installing requirejs-text#2.0.5
bower error UNKNOWN, rmdir 'D:\aura\components\requirejs-text.git\objects\pack\pack-9e9c8d022656b456ba650ba46a7499fd1c5f56ce.idx'

C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\tmp\lib\tmp.js:219
throw err;
^
Error: Callback was already called.
at i (C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\async\lib\async.js:22:31)
at Manager.resolveEndpoints (C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\lib\core\manager.js:135:7)
at EventEmitter.emit (events.js:126:20)
at Package.removeLocalPaths.globOpts.dot (C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\lib\core\package.js:267:30)
at CB (C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:46:5)
at C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:98:18
at CB (C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:46:5)
at C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:98:18
at CB
(C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:46:5)
at C:\Users\Vitaly\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:98:18

@satazor satazor closed this in d4ada06 Feb 24, 2013
Owner
satazor commented Feb 24, 2013

There was a bug that caused callbacks to be fired twice. Still there was an error removing the .git folder during the installation. This kind of errors happen in windows a lot, I think its because of the gitcache.exe or something.

I installed bower via npm today and still getting this error under Windows 8, Git 1.8. Maybe npm version outdated?

Owner
satazor commented Feb 25, 2013

@smakhtin The fix is not yet published

Also, when i doing something like chache-clean, i always get bower error UNKNOWN, rmdir 'C:\Users\smakhtin\AppData\Roaming\bower\cache\jquery\a813099e40be875e603e05dd6ab55d84\.git\objects\pack\pack-755bab149e5ec989ea4ac85cad472d8ec2402562.idx' The same error appearing, when i uninstalling package.

Owner
satazor commented Feb 25, 2013

That happens a lot on windows. I now have a MBP but when I used windows, I had similar errors. The solution was to use http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx to kill the processes locking these folders. The process was called gitcache.exe or something.

'Tis a problem with crappy tortoise.

I sitll get this error with some packages like bower install layoutmanager:

bower cloning git://github.com/tbranyen/backbone.layoutmanager
bower cached git://github.com/tbranyen/backbone.layoutmanager
bower fetching layoutmanager
bower checking out layoutmanager#0.8.4
bower copying C:\xxx\AppData\Roaming\bower\cache\layoutmanager\b59d792341f664f1eb53b7e93892963e
bower cloning git://github.com/documentcloud/backbone.git
bower cached git://github.com/documentcloud/backbone.git
bower fetching backbone
bower cloning git://github.com/components/jquery.git
bower cached git://github.com/components/jquery.git
bower fetching jquery
bower cloning git://github.com/documentcloud/underscore.git
bower cached git://github.com/documentcloud/underscore.git
bower fetching underscore
bower checking out jquery#1.9.1
bower copying C:\xxx\AppData\Roaming\bower\cache\jquery\cf68c4c4e7507c8d20fee7b5f26709d9
bower checking out underscore#1.4.4
bower copying C:\xxx\AppData\Roaming\bower\cache\underscore\9180b1f1c10d9b9f1d0c111b684df18e
bower checking out backbone#0.9.10
bower copying C:\xxx\AppData\Roaming\bower\cache\backbone\f184345e8f03dbe160c843ce1b7248eb
bower installing jquery#1.9.1
bower installing layoutmanager#0.8.4
bower installing underscore#1.4.4
bower installing backbone#0.9.10
bower error Local path is a local repository

C:\xxx\npm\node_modules\bower\node_modules\tmp\lib\tmp.js:219
    throw err;
      ^
Error: Callback was already called.

Can't see gitcache in process list. Can we somehow do this automatically?

I've verified that (in my case at least) it's got nothing to do with gitcache nor any toirtoises (I don't own/use any, digital nor real).

Turns out it's permission problem. In windows with powershell or cmd even with admin privilege, it will still fail removing read-only directories without -force option.

Try rmdir the .git folder manually, you'll get error unless you throw in rmdir -force ...

@asyazwan This was fixed in d4ada06

Still have the same issue after updating to 0.8.1

$ bower -v
0.8.1     
$ bower install jquery                                                                                                                                                                                                              
bower cloning git://github.com/components/jquery.git                                                                                                                                                                                
bower caching git://github.com/components/jquery.git                                                                                                                                                                                
bower fetching jquery                                                                                                                                                                                                               
bower checking out jquery#1.9.1                                                                                                                                                                                                     
bower copying C:\Users\test\AppData\Roaming\bower\cache\jquery\cf68c4c4e7507c8d20fee7b5f26709d9                                                                                                                                
bower installing jquery#1.9.1                                                                                                                                                                                                       
bower error UNKNOWN, rmdir 'C:\Users\test\backoffice-webapp\src\main\javascript\components\jquery\.git\objects\pack\pack-a76c4da3b52849a43eda9e22fd5d7f73b49812ef.idx'  

C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\tmp\lib\tmp.js:219                                                                                                                                           
    throw err;                                                                                                                                                                                                                      
          ^                                                                                                                                                                                                                         
Error: Callback was already called.                                                                                                                                                                                                 
    at i (C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\async\lib\async.js:22:31)                                                                                                                          
    at Manager.resolveEndpoints (C:\Users\test\AppData\Roaming\npm\node_modules\bower\lib\core\manager.js:135:7)                                                                                                               
    at g (events.js:193:14)                                                                                                                                                                                                         
    at EventEmitter.emit (events.js:123:20)                                                                                                                                                                                         
    at null.<anonymous> (C:\Users\test\AppData\Roaming\npm\node_modules\bower\lib\core\package.js:257:26)                                                                                                                      
    at async.each (C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\async\lib\async.js:101:21)                                                                                                                
    at i (C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\async\lib\async.js:24:16)                                                                                                                          
    at CB (C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:46:5)                                                                                                                            
    at C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:98:18                                                                                                                                
    at CB (C:\Users\test\AppData\Roaming\npm\node_modules\bower\node_modules\rimraf\rimraf.js:46:5)                                                                                                                            

@Nami-Doc Yes I am aware of that commit and have checked my bower, it does have that patch. That patch will not remedy permission error.

@asyazwan sorry - was replying to your earlier comment.

So, if I understand correctly, another patch that forces the rmdir command should be submitted?

Maybe let's open this issue again, if it's still not fixed and reported by so many people?

@satazor satazor reopened this Feb 26, 2013
Owner
satazor commented Feb 26, 2013

In bower 0.8.0 I've updated rimraf to the latest version (2.1.x). In 2.0.x, rimraf would check if the file is writable and, if not, would attempt to chmod it before nuking it. The new version does not do this. This is the issue that is causing all the problems in windows machines.

@isaacs The error code coming from rimraf is UNKNOWN in windows because rimraf is attempting to remove a file with rmdir after the unlink attempt fails with EPERM. It seems that attempting to remove a file with rmdir in windows results in UNKNOWN and not the expected ENOTDIR. Shall I report this?

I will downgrade the rimraf version for now and fix the tests in windows

@satazor Is there a workaround that the end users can apply?

Owner
satazor commented Feb 26, 2013

@atestgoral I will commit a fix and will publish 0.8.2 shortly.

@satazor satazor added a commit that referenced this issue Feb 26, 2013
@satazor satazor Fix small issues related with windows, #274.
- Downgraded rimraf to ~2.0.3
- Fix some issues with the tests (install and list tests)
- Fix some more errors with callbacks being fired twice
76b3a1c
Owner
satazor commented Feb 26, 2013

Just launched 0.8.2, should be fixed!
Please let me know if it works now.

@satazor satazor closed this Feb 26, 2013

works like a charm, thanks!

Verified on my side as well, works as advertised. Thanks.

Working, thx.

I was having the same issue on OSX using 0.8.3 - I fixed by manually deleting all the repos in the deps folder then running cache-clean with sudo. Seemed to work for me. This problem only occurred after I updated bower.

Owner
satazor commented Mar 1, 2013

@gregholland will be fixed in the next release.

I had the same issue on OSX with 0.8.3 and fixed it the way @gregholland mentioned.

Owner
satazor commented Mar 1, 2013

The callback issue should be fixed in 0.8.4

@monospaced monospaced referenced this issue in monospaced/angular-mousewheel May 22, 2013
Closed

bower install error on windows #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment