How to fix bower ECMDERR

GithubBowerYeomanWindows Firewall

Github Problem Overview


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.

Github Solutions


Solution 1 - Github

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: https://stackoverflow.com/questions/16298986/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 https://stackoverflow.com/questions/16298986/unable-to-connect-to-github-com-for-cloning and @Sindre Sorhus from https://stackoverflow.com/questions/15669091/bower-install-using-only-https

Solution 2 - Github

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.

Solution 3 - Github

Following commands work for me

> npm cache clean > > bower cache clean

and then

> bower install

Solution 4 - Github

For me updating git to the newest version helped.

Solution 5 - Github

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"
  }
}

Solution 6 - Github

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.

Solution 7 - Github

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

Solution 8 - Github

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 :)

Solution 9 - Github

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.

Solution 10 - Github

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

Solution 11 - Github

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.

Solution 12 - Github

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 ...

Solution 13 - Github

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionleohView Question on Stackoverflow
Solution 1 - GithubleohView Answer on Stackoverflow
Solution 2 - Githubroro_57View Answer on Stackoverflow
Solution 3 - GithubManish NakarView Answer on Stackoverflow
Solution 4 - GithubJan SchärView Answer on Stackoverflow
Solution 5 - GithubHktariView Answer on Stackoverflow
Solution 6 - GithubnbroszView Answer on Stackoverflow
Solution 7 - GithubTomaszView Answer on Stackoverflow
Solution 8 - GithubPathrosView Answer on Stackoverflow
Solution 9 - GithubShobhitView Answer on Stackoverflow
Solution 10 - GithubDmitrii DubrovinView Answer on Stackoverflow
Solution 11 - GithubSynryuView Answer on Stackoverflow
Solution 12 - GithubBartView Answer on Stackoverflow
Solution 13 - GithubAbhishek DhoteView Answer on Stackoverflow