Skip to content

Instantly share code, notes, and snippets.

@cowboy
Forked from mikesherov/grunt.md
Created April 25, 2012 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboy/2491085 to your computer and use it in GitHub Desktop.
Save cowboy/2491085 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. There are several issues to work through:

  1. Cygwin by default installs an old version of node.
  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 doesn't update PATH to point to correct version of node installed normally.
  9. on my system it was in Application data and program files, YMMV, so I added those to my path
  10. to see current path: echo $PATH
  11. to set path: export PATH="your path here"
  12. i added /c/Documents and Settings/mike/Application Data/npm:/c/Program Files/nodejs: to my path
  13. grunt needs to be installed globally and locally
  14. cd to your jquery top level directory
  15. npm install will install local grunt and grunt-compare-size
  16. 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

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