title: PhpStorm/WebStorm terminal shows old NPM version
body: <p>I am on <code>Windows 10 x64</code> running <code>PhpStorm 2018.3</code>.  I have updated NodeJS to 10.14.1 which includes NPM 6.4.1.</p>
  <p>The Windows command line tool shows the correct versions
  <a href="https://i.stack.imgur.com/xjKnz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xjKnz.png" alt="enter image description here" /></a></p>
  <p>PhpStorm settings show the correct versions
  <a href="https://i.stack.imgur.com/TY733.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TY733.png" alt="enter image description here" /></a></p>
  <p>The problem I have is that the PhpStorm terminal still shows NPM 3.10.10 although it shows the correct Node version.</p>
  <p><a href="https://i.stack.imgur.com/G68vb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G68vb.png" alt="enter image description here" /></a></p>
  <p>I have tried:</p>
  <ul>
  <li>Restarting PhpStorm</li>
  <li>Restarting the computer</li>
  <li>Uninstalling and re-installing Node, then restarting the computer</li>
  </ul>
  <p>This causes trouble because the version of NPM running in my IDE terminal cannot see the globally installed packages.</p>
  <p>Global packages from Windows command line</p>
  <p><a href="https://i.stack.imgur.com/NG5jK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NG5jK.png" alt="enter image description here" /></a></p>
  <p>Global packages from PhpStorm terminal</p>
  <p><a href="https://i.stack.imgur.com/NFTBd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NFTBd.png" alt="enter image description here" /></a></p>
  <p>How do I get to the bottom of this?</p>
  <h3>Update</h3>
  <p>Running <code>where npm</code> from the PhpStorm terminal shows that a local dependency has installed the older NPM version</p>
  <p><a href="https://i.stack.imgur.com/R2wBw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2wBw.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/mNVkP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mNVkP.png" alt="enter image description here" /></a></p>
  <p>Is it expected for a locally installed NPM to make it impossible for the terminal to see my global packages?</p>
  <h3>Update 2</h3>
  <p>When I run the Windows command line tool from within the project folder, everything works as expected, unlike the PhpStorm terminal. The right version is seen, global packages are seen, and the <code>where</code> command cannot see the local NPM installed in <em>node_modules</em></p>
  <p><a href="https://i.stack.imgur.com/CYV4w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CYV4w.png" alt="enter image description here" /></a></p>
  <h3>Resolution</h3>
  <p>Thanks to Lena for the solution. Turns out that with <code>PhpStorm 2018.3</code>, <a href="https://youtrack.jetbrains.com/issue/WEB-33571" rel="nofollow noreferrer">a new enabled-by-default setting</a> adds the binaries in the project's local <code>./node_modules/.bin</code> to <code>$PATH</code>, so the terminal would see the locally installed NPM version instead of the global one.  To resolve the issue I went to <code>Settings &gt; Tools &gt; Terminal</code> and unchecked this option:</p>
  <blockquote>
  <p>Add node_modules/.bin from the project root to %PATH%</p>
  </blockquote>
  <p>If anyone involved is reading this, I would suggest allowing the user to add a blacklist of binaries that should not be added when this option is checked.</p>