Getting grunt to work with Cygwin and git on Windows is a bit difficult considering the cygwin package that is installed by git has an outdated version of node running on it (at least that was the case in Windows XP). There are several issues to work through:
- Cygwin by default installs an old version of node, this was only the case in my Windows XP machine.
- Open Cygwin shell
which nodetells you where the executable isnode --versiontells you if it's oldcdto the directory listed bywhich nodemv node.exe node.exe.bak- download node from nodejs.org and install it
- Node installed through installer MIGHT not update PATH to point to correct version of node installed normally.
- on my Windows XP: it was
/c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs - on my Windows 7 machine: it was in
/c/Users/Mike Sherov/AppData/Roaming/npm:/c/Program Files (x86)/nodejs/ - to see current path:
echo $PATH - to set path:
export PATH="your path here" - i added
/c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs:to my path - grunt needs to be installed globally and locally
cdto your jquery top level directorynpm installwill install local grunt and grunt-compare-sizenpm install -g gruntwill install the global grunt that is recognized as in the PATH
that should be it, at least that's what worked for me
@cowboy, I agree. I want to get some confirmation from other windows people first that this is a real fix and not just some noise, but feel free to use it how you like!