grunt is not recognize in jenkins after installing nodejs

I'm trying to run grunt in jenkins (ubuntu), I already install nodejs plugin, then restarted jenkins. I create my job and inside of it I ticked under Build Environment the Provide Node & npm bin/ folder to PATH

Then in the Execute shell I run npm --version in sell my output is + npm --version 1.4.9, but if I run grunt --version, my output is grunt: not found.

I also tried in windows, in this case, I didn't install the nodejs plugin, I install everything from the bash command line. In this case I have this out put from jenkins for node and npm:

C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>node --version v0.10.29 C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>npm --version 1.4.14

and again for grunt: C:\Program Files (x86)\Jenkins\jobs\test-jenkins\workspace>grunt 'grunt' is not recognize as a command or a bash file

I manage to put this working only in Ubuntu.

I added the plugin nodejs to jenkins (jenkins -> manage plugins) and then restarted jenkins. After I went to my job, I checked the Provide Node & npm bin/ folder to PATH.Then I installed all the packages that I needed from the shell.

After that grunt worked fine.