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

NodeJS plugin causes sh to fail in a declarative pipline

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.47
      NodeJS Plugin 1.1.0
    • Similar Issues:

      Description

      I have a simple test declarative pipeline like below.

      pipeline {
        agent any
      
        tools {
          jdk 'Java 8 JDK u25'
          maven 'Maven 3.2.3'
          nodejs 'NodeJS 6.9.1'
        }
      
        stages {
          stage('Test') {
            steps {
              sh 'printenv'
              sh 'java -version'
              sh 'mvn --version'
              sh 'npm --version'
            }
          }
        }
      }
      

      If I comment out the nodejs and npm lines everything works as expected. However, when I include the nodejs and npm lines, I get the following error:

      [jenkinsfile-test_master-JTGJ7AHME5RPKMDJQ2JWSQLE3GQU7TWXQ2QD3USIDK5QXIBGNM3A] Running shell script
      nohup: failed to run command ‘sh’: No such file or directory
      

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                jeffwilliams Jeff Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: