How to fix bower ECMDERR
Asked Answered
C

13

123

I'm using "yeoman" and "bower" on windows 7 but got the following error when I create the app

yo webapp

The error is

bower not-cached    git://github.com/jlong/sass-bootstrap.git#~3.0.0
bower resolve       git://github.com/jlong/sass-bootstrap.git#~3.0.0
bower not-cached    git://github.com/Modernizr/Modernizr.git#~2.6.2
bower resolve       git://github.com/Modernizr/Modernizr.git#~2.6.2
bower not-cached    git://github.com/jquery/jquery.git#~1.10.2
bower resolve       git://github.com/jquery/jquery.git#~1.10.2
bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github
.com/jquery/jquery.git", exit code of #128

Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=No error

The version of the yeoman, bower and node

c:\yo-test>bower -v
1.2.8

c:\yo-test>yo -version
1.1.2

c:\yo-test>node -v
v0.10.15

Any suggestion is much appreciated.

Cornucopia answered 14/2, 2014 at 21:18 Comment(1)
Possible duplicate of Bower install using only https?Egocentrism
C
427

In case you might encounter the same issue...It turns out my machine behind firewall, that won't able to access git://github.com/jquery/jquery.git

Link: Unable to Connect to GitHub.com For Cloning

The solution without changing the firewall:

git config --global url."https://".insteadOf git://

Credit to @bnguyen82 from Unable to Connect to GitHub.com For Cloning and @Sindre Sorhus from Bower install using only https?

Cornucopia answered 14/2, 2014 at 21:59 Comment(7)
Will this have any other side effects?Deprivation
"Both ssh and https are equivalent, since Git 1.6.6+ (2010) and the implementation of smart http protocol" @VonC answered at #3249279Cornucopia
I had to define HOME in environment settings and point it to the folder that contained the .gitconfig file.Mccrary
(+1), for mentioning link to bower install questionPocketknife
For those who get here because of anjular.js installation problem, that's the solution! thanks!Lugworm
Awesome, make my day after a lots of try. finally its work for me. Thankyou :)Bugaboo
Turned out that one of my entry in bower.json was with git://, changed to https:// - it solved my issue. Thanks for pointing right direction.Installation
Z
27

I had the same problem and the answer above didn't work for me. But I found an other one. You can have a problem with your proxy. If you are behind a proxy you have to do theses steps :

put this in .bowerrc to get rid of the err ETIMEDOUT :

{
    "directory": "app/bower_components",
    "proxy": "http://PROXYSERVER:PORT",
    "https-proxy": "https://PROXYSERVER:PORT",
    "strict-ssl": false
}

And this one to get rid of ECMDERR :

git config --global http.proxy http://USER:PASSWORD@PROXYSERVER:PORT

it works for me.

Zettazeugma answered 14/3, 2014 at 8:46 Comment(0)
T
10

Following commands work for me

npm cache clean

bower cache clean

and then

bower install

Twum answered 28/5, 2016 at 13:45 Comment(0)
T
9

For me updating git to the newest version helped.

Tryma answered 23/7, 2015 at 9:36 Comment(0)
S
1

My bower.json first looked like this:

{
  "name": "HelloIonic",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.3.1",
    "ion-datetime-picker": "katemihalikova/ionic-datetime-picker#0.4.0",    
    "ion-tree-list": "fer/ion-tree-list#0.0.10"                             
  }
}

and I had the "failed to execute git remote -ls" problem. After I changed it to the following it suddenly started working:

{
  "name": "HelloIonic",
  "private": true,
  "devDependencies": {
    "ionic": "^1.3.2",
    "ion-datetime-picker": "^0.4.0",
    "ion-tree-list": "^0.0.10"
  },
  "resolutions": {
    "ionic": "^1.0.0-beta.9"
  }
}
Sharenshargel answered 27/10, 2016 at 6:32 Comment(0)
W
1

To contribute to leoh's answer (since I don't have enough rep to post a comment):

If, like me, you found that you could not execute the command because git wasn't installed globally on your machine, opening Tools > Options in Visual Studio, then Projects and Solutions > Web Package Management > External Web Tools, you will see that, by default, there are two git locations:

  • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
  • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

By default (for Visual Studio 2017 Enterprise), these respectively map to:

  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

Then open a command prompt (Windows + R > "cmd"), navigate to the above locations, and run leoh's command. I wasn't sure which to run it from, so I ran it from both just in case. The issue was resolved for me from then on.

Warrant answered 9/1, 2018 at 16:40 Comment(0)
I
0

You can remove all generators which have and install again. It's will be help.

Ileostomy answered 13/4, 2015 at 13:14 Comment(0)
D
0

In my case it was the antivirus' firewall preventing bower to connect with github. I hadn't realized the antivirus was asking through a windows whether i wanted to allow git to perform connection or not.

I allowed it and it worked like a charm :)

Dogger answered 1/5, 2015 at 20:11 Comment(0)
S
0

solution provided by Dakkon_jareth works for me, I was not having app/bower_components but library there, I changed that to app/bower_components and started working, I will also recommend to try 2-3 times after NPM Cache clean.

Scullery answered 27/8, 2015 at 21:44 Comment(1)
If it took 2-3 tries after setting up a proxy, then it probably wasn't the proxy that fixed it. This error can happen if the remote server is unavailable, so you probably just retried until the server was available again.Shanell
A
0

I had same problem. After installed "Microsoft .NET Core 1.0.0 RC2 - VS 2015" this fix it.

Aeroscope answered 17/6, 2016 at 1:3 Comment(1)
I highly doubt this directly fixed the issue in question. The time it took to install that tool was probably enough for the remote server to start responding to requests again.Shanell
I
0

I work with VS 2015 and have the NoGit package installed. Updated it to the 0.1.0 and it fixed the problem.

Hope this might help someone.

Indigo answered 24/11, 2016 at 12:47 Comment(0)
F
0

I've also experienced some strange behavior with bower failing to install all dependencies.

None of posted solutions worked for me, that's why I'm posting this answer.

In my case bower install errored randomly almost each time with different package. All packages were on github, so why suddenly ?

unable to resolve github.com

Obviously something was wrong with networking.

Errors were on dockerized Ubuntu 16.04 running in virtualized rancher, so a number of possible points of failure were pretty big.

But fortunately the solution was extremely simple.

I realized that this is a basic installation and does not even have basic networking tools.

So after running apt install net-tools iputils-ping all errors disappeared forever.

Pretty unexpected for me, hope it helps ...

Fromenty answered 22/3, 2018 at 16:44 Comment(0)
C
-2

Instead of struggling with this, just manually download it and then do a bower install from local folder instead.

Chromo answered 29/4, 2015 at 6:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.