Wednesday, November 5, 2014

grunt is not recognized as an internal or external comman.

I was recently trying to install "grunt" the javascript task runner. I followed all the instructions given by the official website. but when I ran >grunt form my elevated command prompt it did not recognize it.

Problem:
grunt.cmd file was missing in the  C:\Users\[myUserName]\AppData\Roaming\npm directory.

Solution:

I changed my directory to C:\Users\[myUserName]\AppData\Roaming\npm and then again ran this command >npm install -g grunt-cli and then it created a file named grunt.cmd in my npm directory. Then I was able to use >grunt command from my command line.

No comments:

Post a Comment