title: 'bower' is not recognized, want to have Jenkins install grunt, bower
body: <p>I am getting the issue 'bower' is not recognized while running my Jenkins project as I have seen many other people get. However, I know I can get it to work by including the hardcoded path </p>
  
  <pre><code>C:\Users\clang\AppData\Roaming\npm 
  </code></pre>
  
  <p>in my path environment variable. This is not the way I want to do it though.</p>
  
  <p>My goal is to have this Jenkins configuration be able to download, install, and run these commands locally and be able to do so without hardcoding a path as I want it to run on other computers that would have different users hence different paths. This is my current batch script that I am running.</p>
  
  <pre><code>set PATH=%PATH%; %WORKSPACE%\.bin;
  call npm install
  call npm install bower
  call npm install grunt-cli
  call bower install
  call grunt build
  </code></pre>
  
  <p>when bower and grunt are installed by this, the bower.cmd and grunt.cmd are located in this directory</p>
  
  <pre><code>C:\Program Files (x86)\Jenkins\workspace\ClearWork\.bin
  </code></pre>
  
  <p>The command I am running at the top does in fact evaluate to and include the directory where these command files are located but for some reason I am still getting the error saying that bower and grunt are not recognized.</p>
  
  <p>Just to make sure it wasn't an issue with the Jenkins %Workspace% environment variable I even hard coded the location which gave the same result.</p>