error message from socket.io and coffeescript

I created a coffeescript version from the second example here:

http://socket.io/#how-to-use

In the example an express server is used by socket.io and two messages are passed between client and server.

You can take a look at the coffeescript and its generated javascript on pastebin:

Although I can't spot an error in the code the program crashes. Here's the error message:

Without socket.io the application runs fine. I'm certain that the error has nothing to do with express or jade. My machine runs with windows 7 32bit. The browser is the latest version of chrome.

Update:

I changed the port the express server listens to and now the program executes without an error. However socket.io still doesn't work as expected. I changed the client script and added an alert on receiving the message. This alert statement is never executed. I guess that there are no messages passed between client and server but why ?

Express server does not route socket requests correctly. At least id did not in example I was trying :-)

I had a similar problems and when I switched from using express server and started using Apache or even nginx everything was working without problems. Same code was working in nginx and not in express server.

So all in all it might be express server, just try to move your files to whatever "proper" web server you have and test from there.