Skip to content

Instantly share code, notes, and snippets.

@mikesherov
Created April 25, 2012 12:56
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mikesherov/2489540 to your computer and use it in GitHub Desktop.
Save mikesherov/2489540 to your computer and use it in GitHub Desktop.
getting grunt to work on windows with cygwin and git

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:

  1. Cygwin by default installs an old version of node, this was only the case in my Windows XP machine.
  2. Open Cygwin shell
  3. which node tells you where the executable is
  4. node --version tells you if it's old
  5. cd to the directory listed by which node
  6. mv node.exe node.exe.bak
  7. download node from nodejs.org and install it
  8. Node installed through installer MIGHT not update PATH to point to correct version of node installed normally.
  9. on my Windows XP: it was /c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs
  10. on my Windows 7 machine: it was in /c/Users/Mike Sherov/AppData/Roaming/npm:/c/Program Files (x86)/nodejs/
  11. to see current path: echo $PATH
  12. to set path: export PATH="your path here"
  13. i added /c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs: to my path
  14. grunt needs to be installed globally and locally
  15. cd to your jquery top level directory
  16. npm install will install local grunt and grunt-compare-size
  17. npm install -g grunt will install the global grunt that is recognized as in the PATH

that should be it, at least that's what worked for me

Copy link

ghost commented Mar 16, 2013

Nodejs supports Windows now officially, forget Cygwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment