title: Cannot find module 'engine.io'
body: <p>I am running </p>
  
  <pre><code>var io = require('socket.io')(http);
  </code></pre>
  
  <p>which is giving me this error:</p>
  
  <pre><code>module.js:340
      throw err;
            ^
  Error: Cannot find module 'engine.io'
      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; (/home/harshil/chatapp/node_modules/socket.io/lib/index.js:9:14)
      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 Module.require (module.js:364:17)
  </code></pre>
  
  <p>I Have tried npm install -g engine.io,socket.io
  npm update -g npm
  but same and i always get this error</p>
  
  <pre><code>npm WARN unmet dependency /usr/local/lib/node_modules/socket-chat-example/node_modules/socket.io/node_modules/socket.io-adapter requires debug@'1.0.2' but will load
  npm WARN unmet dependency /usr/local/lib/node_modules/socket-chat-example/node_modules/socket.io/node_modules/debug,
  npm WARN unmet dependency which is version 0.7.4
  </code></pre>
  
  <p>npm list gives me this output (showing only the error part)</p>
  
  <pre><code>└─┬ socket.io@1.2.0
    ├── UNMET DEPENDENCY debug@0.7.4
    ├── UNMET DEPENDENCY engine.io@1.4.2
    ├── UNMET DEPENDENCY has-binary-data@0.1.3
    ├── UNMET DEPENDENCY socket.io-adapter@0.3.1
    ├── UNMET DEPENDENCY socket.io-client@1.2.0
    └── UNMET DEPENDENCY socket.io-parser@2.2.2
  
  npm ERR! missing: engine.io@1.4.2, required by socket.io@1.2.0
  npm ERR! missing: socket.io-parser@2.2.2, required by socket.io@1.2.0
  npm ERR! missing: socket.io-client@1.2.0, required by socket.io@1.2.0
  npm ERR! missing: socket.io-adapter@0.3.1, required by socket.io@1.2.0
  npm ERR! missing: has-binary-data@0.1.3, required by socket.io@1.2.0
  npm ERR! missing: debug@0.7.4, required by socket.io@1.2.0
  </code></pre>
  
  <p>What should I do?</p>