title: Node.js app works locally but heroku says missing module
body: <p>I made a simple chat application using Node.JS and Socket.IO, everything works fine locally, but when I push it to heroku it gives me an application error, when I check the logs, this is the error:</p>
  
  <pre><code>Error: Cannot find module 'indexof'
      at Function.Module._resolveFilename &lt;module.js:338:15&gt;
      at Function.Module._load &lt;module.js:280:25&gt;
      at Module.require &lt;module.js:364:17&gt;
      at require &lt;module.js:380:17&gt;
      at Object.&lt;anonymous&gt; &lt;/app/node_modules/socket.io/node_modules/socket.io-parser/node_modules/emitter/index.js:6:13&gt;
      at Module._compile &lt;module.js:456:26&gt;
      at Object.Module._extensions..js &lt;module.js:474:10&gt;
      at Module.load &lt;module.js:356:32&gt;
      at Functin.Module._load &lt;module.js:312:12&gt;
      at Module.require &lt;module.js:364:17&gt;
  </code></pre>
  
  <p>So I figured out that indexof is a module that Socket.IO uses, and it is in my node_modules folder, but for some reason either it's not being pushed to heroku or it's just not being recognized. I reinstalled my modules 5-6 times and recreated the app but it's still giving me the same error. My package.json file has 3 dependencies: Express, Socket.IO and Jade</p>