title: java.lang.NullPointerException: Cannot invoke method minus() on null object - Jenkins
body: <p>Hi I am trying to run python app inside ec2 instance using jenkins pipelines. I am usign <code>publish over ssh</code> plugin to run the command inside ec2 instance but having an error. I am posting the code with error image in the question. Any help would be appreciated</p>
  <pre><code>pipeline {
    agent any
      
    tools {nodejs &quot;node&quot;}
      
    stages {
          
      stage('Git') {
        steps {
          git 'https://github.com/***/Jenkins-NodeJs'
        }
      }
       
      stage('Build') {
        steps {
          sh 'pwd'
          sh 'npm install'
          sh 'npm install express'
        }
      }      
       stage('Deployment') {
          steps {
              script {
                  sshPublisher(publishers: [
                      sshPublisherDesc(
                          configName: &quot;${env.ec2-user}&quot;,
                          transfers: [
                              sshTransfer(
                                  sourceFiles: &quot;/var/lib/jenkins/workspace/Nodejs-pipelines/app.js&quot;,
                                  execCommand: &quot;cd nodejs, cp -f app.js &quot;
                              )
                          ],
                          usePromotionTimestamp: false,
                          useWorkspaceInPromotion: false,
                          verbose: false
                      )]
                  )
              }
          }
      }       
    }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/2dI54.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2dI54.png" alt="enter image description here" /></a></p>