title: How can NPM run a command that isn't in path
body: <p>The <code>ava</code> command is not in my path. I can not run it from in the project directory that contains some AVA tests.</p>
  
  <p>My <code>npm test</code> command of my project is set to <code>ava tests/*.js --verbose</code>, and can somehow call the <code>ava</code> command from the same location in the terminal.</p>
  
  <p>My questions is: how is npm calling the <code>ava</code> command? I suspect it is calling it from the project's <code>node_modules</code> folder, but I could not find it in any source. </p>
  
  <p>If anyone can explain how this happens, or better yet show me the source, I would really appreciate it. </p>