socket.io initialize statement throws error on azure

I have developed a very simple appp in node.js its working fine locally using express and socket.io. But when i deploy this on azure website using git it gives me error. I figure out that line that initialize socket.io throws. Following is my server.js file.

//try this
var http = require('http')
var fs = require("fs");
var express = require("express");
var twitter = require('ntwitter');
var app = express();
var port = process.env.PORT || 1337;


app.get("/", function(request, response){
    var content = fs.readFileSync("template.html");
    // console.log("Contents"); 
    // console.log(content);    

    response.setHeader("Content-Type", "text/html");
    response.send(content);

});

var server = app.listen(port, function() {
    //console.log('Listening on port %d', server.address().port);
});

Following line works locally but on azure gives throws error

var io = require('socket.io').listen(server); //working on localhost

multiple folders named "emitter" that contained the indexof module also had a gitignore file that made git ignore the module, no idea why that was even there, but deleting them fixed the problem

used git add -A --force it solved it for azure and heroku after push. socket.io working perfectly.