【问题标题】:Bower gets stuck in OSXBower 卡在 OSX 中
【发布时间】:2016-04-06 11:36:49
【问题描述】:

我正在尝试使用 OSX el-captain 中的 bower 安装 angularjs。当我运行 bower install 时,它会输出如下几行:

bower cached        git://github.com/twbs/bootstrap.git#3.3.6
bower validate      3.3.6 against git://github.com/twbs/bootstrap.git#*

然后就卡住了。我也尝试了详细选项,希望我能获得更多信息,但输出保持不变。

任何想法为什么会卡住??

谢谢。

【问题讨论】:

  • 您等了多长时间才发现它被卡住了?
  • 30 分钟。在我的 windows 机器上,使用完全相同的 bower.json 文件,脚本在 5 分钟内完成。
  • 哈哈好吧,我想肯定有问题...
  • 你的节点是什么版本的?

标签: angularjs bower


【解决方案1】:

我有同样的问题,试试这个修复,它将使用 https 方法而不是 git 方法。

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

希望它能解决您的问题。

【讨论】:

    【解决方案2】:

    由于代理设置很少,您的系统可能会在通过 bower 从 git 下载软件包时阻塞。所以在你的 .bowerrc 文件中你需要提供代理配置。

    此链接可能对您有所帮助! bower behind a proxy

    这里是示例 .bowerrc 文件:

    {
      "directory": "bower_components",
      "proxy":"your proxy http url",
        "https-proxy":"http://<username>:<password>@<your proxy>"
    }
    

    在上面的设置中你需要替换成你的信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-26
      • 2016-08-22
      • 2012-10-15
      • 1970-01-01
      • 1970-01-01
      • 2016-04-24
      • 2017-11-15
      • 2013-08-04
      相关资源
      最近更新 更多