Grunt Tasks Fails on Windows For grunt-htmlcompressor

If you’re running a grunt task and it uses grunt-htmlcompressor, if you’re on a Windows machine, you’ll need to install Java.

The error would be something like “htmlcompressor failed to compress html

Once Java is installed, you’ll have to “register” it with Windows by adding an environment path to the java.exe file.¬† So…

  • hit the Windows key on your keyboard to bring up the Windows search
  • Search for advanced system settings
  • System Property window ill popup, go to Advanced tab
  • Hit the Environment Variables
  • Highlight¬†Path under System variables and hit the Edit key
  • And add your new path there.¬† See screenshot below…