Nodejs with socket.io on heroku

I'm trying to run a nodejs application with express and socket.io on heroku and it comess out with this error

EACCESS, Permission denied

when i try to run following code:

app.configure(function () {
   app.set('port', process.env.PORT || 3000);
});
var server = http.createServer(app).listen(app.get('port'))
io = require('socket.io').listen(server); // it crashes on this line
io.configure(function () {
    io.set("transports", ["xhr-polling"]);
    io.set("polling duration", 10);
    io.set("log level", 1);
});

Is it even possible to do this on heroku?

dependencies:

"socket.io": "*",
"express": "3.0.0rc4",

Check this link: using socket.io with node.js on heroku.

[UPDATE 1]

Check this answer, which I think can help you troubleshooting your problem.

[UPDATE 2]

A link to a question that has working code (regardless of the client's bug, the motivation of the question itself).

var port = process.env.PORT || 3000;

var app = require('express').createServer()
var io = require('socket.io').listen(app);

app.listen(port);

// Heroku setting for long polling
io.configure(function () { 
    io.set("transports", ["xhr-polling"]); 
    io.set("polling duration", 10); 
});

// To set handlers for data received, etc ... use io.sockets.on('...', ...)

What does it do when you:

io = require('socket.io');
app.configure(function () {
   app.set('port', process.env.PORT || 3000);
});
var server = http.createServer(app).listen(app.get('port'))
io.listen(server); // it crashes on this line
io.configure(function () {
    io.set("transports", ["xhr-polling"]);
    io.set("polling duration", 10);
    io.set("log level", 1);
});

I realize that shouldn't do anything differently, but I'm just curious.