Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


node js app works locally but heroku says missing module


node js app works locally but heroku says missing module  using -'node.js,heroku,socket.io'

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:

Error: Cannot find module 'indexof'
    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.<anonymous> </app/node_modules/socket.io/node_modules/socket.io-parser/node_modules/emitter/index.js:6:13>
    at Module._compile <module.js:456:26>
    at Object.Module._extensions..js <module.js:474:10>
    at Module.load <module.js:356:32>
    at Functin.Module._load <module.js:312:12>
    at Module.require <module.js:364:17>


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
    

asked Sep 18, 2015 by deepak
0 votes
23 views



Related Hot Questions



Government Jobs Opening


...