如何修复Bower ECMDERR问题

123

我在Windows 7上使用「yeoman」和「bower」,但在创建应用程序时出现以下错误

yo webapp

错误为

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

Yeoman、Bower 和 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

非常感谢您提供的任何建议。


可能是重复的问题:仅使用https安装Bower? - kenorb
13个回答

0

我使用VS 2015,并安装了NoGit包。 将其更新到0.1.0版本,问题得以解决。

希望这能帮助到某些人。


0

我也经历了一些奇怪的行为,bower未能安装所有依赖项。

对我来说,没有任何发布的解决方案可用,这就是我发布这个答案的原因。

在我的情况下,每次使用不同包时,bower install会随机 出错 。 所有软件包都在github上,所以为什么突然出问题呢?

无法解析github.com

显然,网络出现了问题。

错误发生在docker化运行于虚拟化牧场中的Ubuntu 16.04上,因此可能存在许多故障点。

但幸运的是,解决方案非常简单。

我意识到这是基本安装甚至没有基本网络工具。

因此,在运行 apt install net-tools iputils-ping之后,所有错误都永远消失了。

这对我来说非常意外,希望它有所帮助...


-2

不要再为此奋斗了,只需手动下载,然后从本地文件夹中执行 bower install 命令即可。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接