Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 bower - not installed

Using a Empty Template in Visual Studio 2015, the following configuration fails to install dependencies.

{
  "name": "ASP.NET",
  "private": true,
  "dependencies": {
    "bootstrap": "3.0.0",
    "bootstrap-touch-carousel": "0.8.0",
    "hammer.js": "2.0.4",
    "jquery": "2.1.4",
    "jquery-validation": "1.11.1",
    "jquery-validation-unobtrusive": "3.2.2"
  }
}

While the same configuration for a Web Application Sample template in ASP.NET completes successfully.

My colleagues are running into the same problem.

Is this a Known issue? Is there a work around? What am I missing?

Error in the output window is :

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" install --force-latest
bower bootstrap#3.0.0        ENOTFOUND Request to https://bower.herokuapp.com/packages/bootstrap failed: getaddrinfo ENOTFOUND

So I got this error tinkering around the configs again.

ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/twbs/bootstrap.git", exit code of #128

like image 772
kanchirk Avatar asked Jul 27 '15 13:07

kanchirk


1 Answers

I ran into a similar error in VS 2015 RTM (not RC). This fixed for me:

  1. Install git tools (if not already installed) from http://git-scm.com/download/win
  2. In the command line enter the following command(or git bash if you did not add git to your PATH): git config --global url."http://".insteadOf git://
  3. In VS menu Tools > Options.. > Projects and Solutions > External Web Tools
  4. Uncheck $(DevEnvDir)\Extensions\Microsoft\Web Tools\External\git
  5. Add C:\Program Files (x86)\Git\bin

Hope this helps.

Note: that I experienced this on a MVC 5 web app, not the new preview template but I am using Gulp/Bower/NPM tooling.

UPDATE 1 Although not a duplicate scenario the error messages are similar. I wonder if some override is done in the Web Application template somewhere? Would be good to find if thats the case. VS 2015 + Bower: Does not work behind firewall

UPDATE 2 I tried in an empty project after the above changes: bower bootstrap#3.0.0 not-cached git://github.com/twbs/bootstrap.git#3.0.0 bower bootstrap#3.0.0 resolve git://github.com/twbs/bootstrap.git#3.0.0

like image 114
Devon Burriss Avatar answered Nov 21 '22 01:11

Devon Burriss