0

When I try to install the jquery-validation bower package in VS2015, I am not getting a dist folder under bower_components/jquery-validation while my co-workers are. I'm guessing that I have something configured wrong on my box, but what can it be? FYI, I have VS2015 Update 3, .NET Core 1.0.0 - SDK Preview 2, and .NET Core 1.0.0 - VS 2015 Tooling Preview 2.

Here's an easy way for me to produce the problem on my computer (although it works for others):

  1. Create a new ASP.NET Core Web Application (.NET Core) project, using the Empty template
  2. Right click on the project and click on Manage Bower Packages
  3. Click browse and search for jquery-validation
  4. Click Install
  5. Look under the bower_components/jquery-validation folder and there should be a dist folder (but it is missing for me)

Another clue is that I believe that grunt is involved in the creation of the dist folder. The jquery-validation folder has a gruntfile.js file. It seems that perhaps my co-workers have grunt running automatically when they download a bower package, but I'm not sure how to configure that.

Scott
  • 1,223
  • 2
  • 16
  • 35

3 Answers3

4

I solved exactly the same problem in the following way:

  1. In Visual Studio \ Tools \ Options \ Projects and Solutions \ External Web Tools replaced $(VSINSTALLDIR)\Web\External\git by C:\Program Files\Git\bin (path to git.exe from Git for Windows installation).
  2. Cleared bower cache directory: %UserProfile%\AppData\Local\bower\cache.
  • Thanks for your help! I tried the other answers, but this is the one that finally did the trick for me. – Scott Oct 28 '16 at 18:52
0

check please 'wwwroot/lib'. I think bower should save there packages.

  • Thanks for your answer, but I do not even have a wwwroot/lib folder after performing the steps above. – Scott Aug 04 '16 at 14:01
  • Oh, I see in that case read this article. Probably you have to install/config gulp task for bower. https://nocture.dk/2015/04/10/asp-net-5-gulp-bower-scratch/ – Jakub Solarz Aug 04 '16 at 14:05
  • Well, that destroyed my project with a MSB4018 The "FindConfigFiles" task failed unexpectedly - PathTooLongException. – Vidar Sep 29 '16 at 10:25
0

I answered a similar question recently for same issue: https://stackoverflow.com/a/39185621/6137718 . This is also solvable by having a grunt-task at the project-level that automatically runs npm install on all bower packages - however, since I'm following a simple tutorial, I did not investigate this further. Below is the answer I submitted for getting the dist folder populated:


I had a similar issue and was able to fix it by installing grunt globally then running npm install in the jquery-validation folder:

  1. Open node js command prompt and run npm install -g grunt
  2. In any command prompt (I used developer command prompt from VS) navigate to jquery-validation folder and run npm install

Afterwards, the jquery-validation\dist folder should show up with the jquery.validate.js file.

Community
  • 1
  • 1
gnalck
  • 972
  • 6
  • 12
  • Thanks for your answer. I do know how to manually create the jquery-validation dist folder but am trying to determine why my co-workers have it automatically created when they follow my steps and i do not. – Scott Aug 29 '16 at 17:05
  • This actually worked to get me the dist folder, but the overall command still failed with `Running "jscs:all" (jscs) task Fatal error: Neither config file nor grunt options were defined` and I don't get a minified version – lesscode Sep 03 '16 at 00:51