title: Node.js: Cannot find module 'chai'
body: <p>I am trying to follow a first example from <a href="https://mochajs.org/" rel="noreferrer">https://mochajs.org/</a></p>
  
  <p>Done this</p>
  
  <pre><code>$ npm install -g mocha
  </code></pre>
  
  <p>Got</p>
  
  <pre><code>C:\Windows\system32&gt;npm install -g mocha
  npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install th
  e latest version of pug instead of jade
  npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fai
  l on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possibl
  e.
  C:\Users\TestUser\AppData\Roaming\npm\_mocha -&gt; C:\Users\TestUser\AppData\Roamin
  g\npm\node_modules\mocha\bin\_mocha
  C:\Users\TestUser\AppData\Roaming\npm\mocha -&gt; C:\Users\TestUser\AppData\Roaming
  \npm\node_modules\mocha\bin\mocha
  mocha@2.4.5 C:\Users\TestUser\AppData\Roaming\npm\node_modules\mocha
  ├── escape-string-regexp@1.0.2
  ├── growl@1.8.1
  ├── commander@2.3.0
  ├── diff@1.4.0
  ├── supports-color@1.2.0
  ├── debug@2.2.0 (ms@0.7.1)
  ├── mkdirp@0.5.1 (minimist@0.0.8)
  ├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
  └── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
  </code></pre>
  
  <p>Also installed chai (sorry, I originally forgot to mention it)</p>
  
  <pre><code>C:\Windows\system32&gt;npm install -g chai
  chai@3.5.0 C:\Users\TestUser\AppData\Roaming\npm\node_modules\chai
  ├── assertion-error@1.0.1
  ├── type-detect@1.0.0
  └── deep-eql@0.1.3 (type-detect@0.1.1)
  </code></pre>
  
  <p>And here is the code</p>
  
  <pre><code>var assert = require('chai').assert;
  describe('Array', function() {
    describe('#indexOf()', function () {
      it('should return -1 when the value is not present', function () {
        assert.equal(-1, [1,2,3].indexOf(5));
        assert.equal(-1, [1,2,3].indexOf(0));
      });
    });
  });
  </code></pre>
  
  <p>Keep getting </p>
  
  <pre><code>Error: Cannot find module 'chai'
  at Function.Module._resolveFilename (module.js:325:15)
  at Function.Module._load (module.js:276:25)
  at Module.require (module.js:353:17)
  at require (internal/module.js:12:17)
  at Object.&lt;anonymous&gt; (c:\git\develop\SendText\test\test2.js:1:76)
  at Module._compile (module.js:409:26)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.Module.runMain (module.js:441:10)
  </code></pre>
  
  <p>What am I doing wrong?</p>