2

The webproject that I am working on uses SASS which is compiled into Grunt tasks, and grunt is supposed to run in NodeJS.

I have been given these instructions but it's not working:

img

I installed NodeJS (default folder/settings)

I then went in my project folder in CMD C:\Users\Ben\Desktop\officeincambridge>

Then ran the command npm install -g grunt-cli and npm install grunt

If I type NPM version (in dir above) I get npm --version: 1.4.14 , node --version: v0.10.29

However, when if I try and compile the files using grunt sass i get this error message 'grunt' is not recognized as an internal or external command, operable program or batch file.

Can anyone assist me on how to use it (I have never used grunt before). HERE are the instructions which I am using.

Thank you

ben_dchost
  • 875
  • 4
  • 13
  • 24

3 Answers3

5

Try to install
npm install -g grunt-cli

rjshkrmara
  • 79
  • 1
  • 5
4

This seems to be a duplicate of this question: Grunt on Windows 8: 'grunt' is not recognized

In his case, it was a PATH issue. Check that your PATH is correct. It must contains the path where npm is installed: C:\Users\Ben\AppData\Roaming\npm

Community
  • 1
  • 1
Sylvain B
  • 513
  • 7
  • 12
  • thank you the the reply. turns out restarting cmd and running npm install command did the trick. Thanks and sorry for duplicating the question! – ben_dchost Jul 02 '14 at 10:04
0

I also had the same issue : To Solve this I have added "grunt path" in SYSTEM environment Variable . C:\Users\\AppData\Roaming\npm\grunt

To find your grunt path Use Command(in cmd) : where grunt

Once Added Path to SYSTEM Environment Variable Restart Jenkins and build job again

Mayank Raipure
  • 1,773
  • 15
  • 12