1

We are trying to run dalek on a Windows box with Jenkins.

We installed nodejs binary on the Windows box.

We installed the nodejs plugin on Jenkins.

When we run our job, we get this error:

[Test] $ C:\Windows\TEMP\hudson1848754731046994976.js
FATAL: command execution failed
java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson1848754731046994976.js" (in directory "C:\jenkins\workspace\Test"): CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessBuilder.start(Unknown Source)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
    at hudson.Launcher$ProcStarter.start(Launcher.java:353)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:326)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at hudson.remoting.Engine$1$1.run(Engine.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 17 more

What does this error mean ? Is there a workaround to get us to run dalekjs ?

Thanks

chz
  • 355
  • 1
  • 7
  • 21

2 Answers2

2

First, make sure that you have configured the nodejs installation path in jenkins. If it still doesn't work try to create a symlink folder called bin in your node installation path pointing to itself.
This was how I did it. Open a terminal and execute:

mklink /j "C:\Program Files\nodejs\bin" "C:\Program Files\nodejs"
Abris
  • 1,451
  • 3
  • 18
  • 38
0

Have you defined nodejs installation path in Jenkins configuration?