I uninstalled grunt with following command.
npm uninstall -g grunt
Then I again installed grunt with following command.
npm ins
I had this issue on my Windows grunt because I installed the 32 bit version of Node on a 64 bit Windows OS. When I installed the 64bit version specifically, it started working.