Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 460
Alejandro Baltra Avatar asked Oct 10 '12 17:10

Alejandro Baltra


People also ask

How do I fix Jenkins build failure?

In Jenkins, in the pipeline where the failure occurred, in the navigation pane, click Rebuild. In the Rebuild page, select the ReRun check box , and click Rebuild.

Does Jenkins Support Node JS?

Provides Jenkins integration for NodeJS & npm packages.


1 Answers

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.

like image 55
Alejandro Baltra Avatar answered Nov 02 '22 08:11

Alejandro Baltra