title: global installation of npm modules on windows
body: <p>I have installed node on my windows 8 machine and even if I install a module globally, my code cannot find the module. </p>
  
  <pre><code>C:\Windows\system32&gt;npm -g install connect
  connect@3.2.0 C:\Users\Abhishek\AppData\Roaming\npm\node_modules\connect
  ├── utils-merge@1.0.0
  ├── parseurl@1.3.0
  ├── debug@2.0.0 (ms@0.6.2)
  └── finalhandler@0.2.0 (escape-html@1.0.1)
  
  C:\Windows\system32&gt;d:
  
  D:\&gt;cd myapps\todo
  
  D:\myapps\todo&gt;node server.js
  
  module.js:340
      throw err;
            ^
  Error: Cannot find module 'connect'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.&lt;anonymous&gt; (D:\myapps\todo\server.js:1:77)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Function.Module.runMain (module.js:497:10)
  
  D:\myapps\todo&gt;
  </code></pre>
  
  <p>I recollect that on a linux environment I had done <code>sudo npm -g install connect</code> and then my code was able to find the module.</p>
  
  <p>So what is going wrong here?</p>