Jenkins build fails when running nodeJS

I have Jenkins set up on a machine with the NodeJS plugin. Sadly, whenever I try to use the plugin in a build, it fails with:

[workspace] $ node /tmp/hudson3477900862350780409.js
FATAL: command execution failed
java.io.IOException: Cannot run program "node" (in directory          
"/var/lib/jenkins/jobs/XXX/workspace"): error=2, No such file or directory

When I log into the machine as the jenkins user, I can use node through command line. I also added the path to node (/opt/node-0.6.18/bin) into the Configuration screen for the current working node (which is only one: master).

I've been stuck with this for a while, any help would be highly appreciated.

Cheers!

Well, this isn't the most elegant of solutions, but it worked: I simply made a symlink to from /bin/ to the installation path for node and now the problem's gone.

ah easy, you need to tick "Provide Node/npm bin folder to PATH" when running a "execute shell" build task"

the error came up just because you did't install node in your machine.after you installed it,and add it to PATH,then the problem can be solved. hope it helps.