Whenever I try to use require("socket.io"); on heroku it fails with the message “Cannot find module socket.io”.
I think it’s an issue with my setup, because the same is running fine in my local node.js server.
What do I have to change?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to change your PaaS provider. Heroku doesn’t support websockets. Where as nodejitsu is known for support websockets.
Also, you might have forgot adding
socket.ioin package.json dependency lists.