VS 2015 + Bower: Does not work behind firewall

前端 未结 12 2213
一向
一向 2020-11-29 01:40

Problem

In Visual Studio 2015, using bower, my package restores fail when behind a firewall with an error similar to:

ECMDERR Failed to exec

12条回答
  •  隐瞒了意图╮
    2020-11-29 02:40

    The solution that worked for me with VS2015 Release is to :

    1. Install git command line tool.
    2. Modify the file C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\bower.cmd with this content:

      set PATH=C:\Program Files (x86)\Git\bin\;%PATH%
      git config --global url."http://".insteadOf git://
      git config -l
      @"%~dp0\node\node" "%~dp0\bower\node_modules\bower\bin\bower" %*
      

提交回复
热议问题