Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Grunt with non-global installation

Tags:

npm

gruntjs

While attempting to build a custom version of jQuery without installing global dependencies, I ran into the following issue:

$ node --version
v0.10.4
$ npm --version
1.2.18

$ git clone git://github.com/jquery/jquery.git
$ cd jquery
$ git checkout `git describe --abbrev=0 --tags` # latest tag
$ npm install
$ npm install grunt-cli

# variant A
$ npm run-script grunt custom:-ajax # does nothing

# variant B
$ node_modules/.bin/grunt custom:-ajax
Running "custom:-ajax" (custom) task
Creating custom build...
Warning: Error: not found: grunt Use --force to continue.
Aborted due to warnings.

I haven't worked with Grunt or Node much before, so what am I missing here?

like image 384
AnC Avatar asked Feb 11 '26 08:02

AnC


1 Answers

This is because of how the jQuery custom task spawns grunt. I've just sent a pull request which would fix this issue: https://github.com/jquery/jquery/pull/1255

like image 139
Kyle Robinson Young Avatar answered Feb 15 '26 18:02

Kyle Robinson Young



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!