Jenkins build step failed when calling "npm" on mac-os-x Yosemite

Before starting, I want to say that I already checked these answers:

Jenkins build fails with error 'npm install <whatever>'

Jenkin build error when installing npm

Now I have been dealing with this problem for some time, and so I tried a bunch of things.

Firstly, I installed node + npm via homebrew. Simple $ node -vand $ npm -vrepeat version v0.10.36 for node and v2.3. * For npm, which also means that I HAVE IN THE PATH, and they work during a call in the terminal.

Just adding node -v; npm -va shell to Jenkins to execute does not happen. After a little intervention, I copied what the $: which nodeabove script gave in the terminal, which now looked like this: /usr/local/bin/nodeand, apparently, it worked. Jenkins build succeeded, and the console.

When you do the same for the "npm" that turned out to be /usr/local/bin/npm --version, the computer gods were no longer so merciful. This time a big error was thrown env: node: such a file or directory ", and the whole assembly failed.

The actual command that fails, $ /bin/sh -xe /var/folders/wr/g_dl81tn5_x0t_yz3jw602cr0000gn/T/hudson8770480548136671253.shand “unexpectedly,” when I run the same command in the terminal, it succeeds.

I also uninstalled the homebrew node and npm versions and installed them later through the package manager. The same results.

: https://gist.github.com/DanHerbert/9520689, .

:

  • Jenkins 1.613 1.5 **
  • Jenkins, . , Jenkins, who am i script .
  • sudo'ing doens't help
  • -
  • , xtools,
  • jenkins- node (, , )

, , , , ..

+4
1

. , PATH, , Jenkins, , , script :

enter image description here

!

- Jenkins EnvInject Plugin textarea , :

enter image description here

+10

All Articles