title: Unable to start pm2 via jenkins pipeline
body: <p>on a <strong>Windows</strong> machine, I have setup a very simple pipeline in Jenkins that does the following:</p>
  
  <ol>
  <li><p>clone a git repository, </p></li>
  <li><p>install the packages, </p></li>
  <li><p>run the app via "<strong>pm2 start command</strong>"</p></li>
  </ol>
  
  <p>Below is the entire pipleline script :</p>
  
  <pre><code>node {
      stage('dev'){
  git credentialsId: 'my-credentials', url: 'git@myurl.git'
  
  bat 'npm install'
  
  bat 'pm2 start src\\index.js --name myapp'
  
  }
  }
  </code></pre>
  
  <p>Everything works fine except running the <strong>pm2</strong> command. The output error says : </p>
  
  <p><em>'pm2' is not recognized as an internal or external command,
  operable program or batch file.</em></p>
  
  <p>However, I can easily run the exact same <strong>PM2</strong> command via CMD, I have tried putting the last line command into a <strong>.bat</strong> file and asked jenkins to execute it, and get the same error.</p>