Embed URL

HTTPS clone URL

Subversion checkout URL

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 node tells you where the executable is

node --version tells you if it's old

cd to the directory listed by which node

mv 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

cd to your jquery top level directory

npm install will install local grunt and grunt-compare-size

npm install -g grunt will install the global grunt that is recognized as in the PATH

@mikesherov i saw in your email that you use Windows XP. Node.js doesn't officially support Windows XP, and I've definitely experienced problems with it. I can't remember if they were filesystem or child process based issues, but they were very real and a huge PITA at the time.

fwiw I'm using grunt inside PowerShell in Windows 7 without Cygwin (I use msysgit for git and don't need bash). It also works in regular old Command Prompt, difference being (from PowerShell) that you have to type grunt.cmd instead of grunt

The whole grunt.cmd vs grunt and npm.cmd vs npm is a bit grating ... @rdworth are you relatively happy using PowerShell? I like working in cygwin/bash since it's a "real" shell. I suppose I could alias them.