Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41762

NodeJS plugin not updating PATH as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • nodejs-plugin
    • None
    • Amazon Linux EC2 instance using Jenkins ver. 2.32.2 and NodeJS plugin version 1.0.1

      I have followed the instructions on the "Usage" section of https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin which had worked for me in the past but on 2 recently created instances the path is not being updated with the commands.

      When using the simple shell example with the build environment to provide the node and npm bin folder to the path, I get the following output and error:

      [EnvInject] - Loading node environment variables.
      Building in workspace /var/lib/jenkins/workspace/Test nodejs
      $ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/npm install -g bower grunt-cli
      /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/grunt -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/grunt-cli/bin/grunt
      /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/bower -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/bower/bin/bower
      grunt-cli@1.2.0 /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/grunt-cli
      ├── grunt-known-options@1.1.0
      ├── nopt@3.0.6 (abbrev@1.0.9)
      ├── resolve@1.1.7
      └── findup-sync@0.3.0 (glob@5.0.15)
      
      bower@1.8.0 /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/bower
      [Test nodejs] $ /bin/sh -xe /tmp/hudson7648911894139277606.sh
      + echo /sbin:/usr/sbin:/bin:/usr/bin
      /sbin:/usr/sbin:/bin:/usr/bin
      + node --version
      /tmp/hudson7648911894139277606.sh: line 3: node: command not found
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE
      

            Unassigned Unassigned
            stefangoor Stefan Goor
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: