title: How do you install and run Mocha, the Node.js testing module? Getting "mocha: command not found" after install
body: <p>I'm having trouble getting <a href="http://visionmedia.github.com/mocha/" rel="noreferrer">Mocha</a> to work as expected, and I'd love to say as documented, but there (appears) to not be much documentation on actually getting the thing running.</p>
  
  <p>I've installed it using <code>npm</code> (both globally and locally), and each time when I run it I get:</p>
  
  <pre><code>$ mocha
  mocha: command not found
  </code></pre>
  
  <p>Ok, so I figured it's not in my <code>PATH</code>, so I tried running it directly,</p>
  
  <pre><code>$ ./node_modules/mocha/bin/mocha 
  execvp(): No such file or directory
  </code></pre>
  
  <p>Finally, I tried hitting the other <code>bin</code> file, and got,</p>
  
  <pre><code>$ ./node_modules/mocha/bin/_mocha 
  path.existsSync is deprecated. It is now called `fs.existsSync`.
  
    .
  
    ✔ 1 tests complete (1ms)
  </code></pre>
  
  <p>How can I just execute my tests with a single command? <a href="http://vowsjs.org/" rel="noreferrer">Vows</a> seems to let you, but I've heard Mocha is the better choice, I just can't seem to get it working correctly.</p>
  
  <p>And any thoughts on the error I got above in my third attempt?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'm running,</p>
  
  <ul>
  <li>Ubuntu 11.10 64-bit</li>
  <li>Node.js 0.7.5</li>
  <li>npm 1.1.8</li>
  <li>mocha 0.14.1</li>
  <li>should 0.6.0</li>
  </ul>