8

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

3
  • Looks like a host not resolved issue: do you have a proxy or something that might be filteri8ng non-interactive HTTP requests?
    – Richard
    Jul 27, 2015 at 13:54
  • @Richard I wish it was. Nopes both the proxy and https-proxy are properly configured. As mentioned above, it works correctly using the "Preview" Template but not with the Empty Template.
    – kanchirk
    Jul 27, 2015 at 14:00
  • Please check this link. This fixed my problem Try reinstalling git with following option Apr 28, 2016 at 0:49

7 Answers 7

19

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

5
  • thanks for your answer. But it did not help me. Hopefully it will help others who might run into the issue.
    – kanchirk
    Jul 28, 2015 at 16:35
  • OMG it fixed it! Well first it caused Visual Studio 2015 Enterprise to crash on me, so I got worried. After restarting VS2015 back up, it worked perfect. Thank you deebo, now give back Red's chain! His grandmother gave it to him! :) Jan 26, 2016 at 16:28
  • 2
    I'll keep it till Friday ;) Jan 26, 2016 at 19:55
  • This one worked for me. It was really not downloading the packages, not just the bug the other answer mentioned. After doing this it worked.
    – Tyler
    Apr 18, 2016 at 2:11
  • Steps #4 & #5 in isolation cured my "Bower - not installed" issues. +1. Apr 28, 2016 at 16:46
16

This is a bug. Expand the wwwroot/lib folder, and it's clear that the packages actually are loaded. Close/reopen the project, all appears well. We've opened a bug on this from your report. Thanks for an actionable description of the problem, sorry about the experience.

1
  • I didn't even have to close the project. Just started saving files to get ready to close and it cleared up.
    – devSpeed
    Jul 28, 2015 at 0:26
1

I also run in this problem with VS2015 3 and I did what Owen did but it didn't work for me.

What I did in the end was to

  1. delete bower.json and .bowerrc files
  2. delete bower_components and wwwroot folders.
  3. added a new bower configuration file to the project
  4. added again the dependencies in it.

It worked.

From what I saw in output window before deleting at the end the wwwroot folder if you try to add a new bower configuration file VS only installs bower if you add a new dependecy and also after that it checks in the wwwroot folder that the dependecy files aren't already installed (unfortunatelly I didn't save the output which was saying that it doesnt install the dependecy cause there is already a dependency with same version installed). This means that probablly only deleting bower_components and wwwroot folder and restoring packages could fix the issue.

0

May be some bower`s component is not installed. Remove and reinstall this component this via Bower Packege Manager. I had similar situatution after cloning repo. Ng-table lib was not restored and VS show me message in Sulotion Expolrer Bower - Not Installed. This manipulations helped me.

0

I just ran into this in VS2015.3. I don't have the time to dig into what is happening to cause the orphanage, but basically the folder under bower_components was identifying as a non-bower folder(?) and preventing bower install from installing the package. (I suspect an issue with VS and TS git repos.)

After trying the tests @deebo listed, I was not any closer. To get this back into a working state I performed the following steps:

  1. Delete everything under bower_components
  2. Run bower install again.

At this point all of my modules installed correctly. I hope this helps anyone else who runs into this.

0

Usaly you just need delete bower_components folder in a project and do Bower/Restore Packeges. It`is some bower magic.

-2

Instead of

{
    "jquery-validation": "1.11.1",
    "jquery-validation-unobtrusive": "3.2.2"
}

just use

{
    "jquery-validation": "*",
    "jquery-validation-unobtrusive": "*"
}

when you use "*" you are telling bower to install any version that is available on the nuGet packages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.