10

I am trying to add jquery-validation to a project in visual studio 2015. When I add "jquery-validation" to bower.json I see that the jquery-validation folder is added to wwwroot/lib/ but there is no dist/ folder.

The jquery-validation package looks like it needs to be built but I cannot see how to build from within visual studio 2015. A right click on the grunt file does not show the task runner explorer.

If I use a command window and try to use "npm install" and "grunt" in the wwwroot/lib/jquery-validation/ folder I get an error after the "jscs:all" task:

Running "jscs:all" (jscs) task
Fatal error: Neither config file nor grunt options were defined

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.0
npm ERR! npm  v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `grunt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'grunt'.
npm ERR! This is most likely a problem with the jquery-validation package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs jquery-validation
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls jquery-validation
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\asp.net 5 ef7 bootstrap anygular web app\4-aspdotnet-5-ef7-bootstrap-angular-web-app-m4-exercise-files\after\src\TheWorld\wwwroot\lib\jquery-validation\npm-debug.log

I must be missing something simple!

4
  • I have nearly the same Problem. Grunt has to build up the dist Folder but failes because the Windows System stops building paths with more than 260 characters. Commented Apr 22, 2016 at 13:59
  • Did you ever figure out how to correct this issue? I'm struggling with it right now. Commented Aug 11, 2016 at 12:48
  • Same here - neither answer below seems to work for me - I get the same error as the OP Commented Sep 2, 2016 at 22:14
  • Any help here?? Commented Sep 24, 2016 at 22:23

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

npm warn deprecated [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
1

npm 2 generates several nested folders which causes paths on Windows to bug. If that is the issue then you should update to npm 3 where they fixed it.

npm i -g npm

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.