chat-example
chat-example copied to clipboard
Uncaught TypeError: undefined is not a function
I get this error when changing a single line in your index.html
var socket = io();
to
var socket = new WebSocket('ws://192.168.1.174:10080/mcu');
I am not using Node.js, but my server does support websockets. Any idea you may have as to how I can fix this would be awesome.

Using node works without an issue. My guess is .emit and .on functions don't work as well with standard ws
So node its sending something to make it valid? Seems odd, but ok.
On Jun 16, 2014 4:02 PM, "arshem" [email protected] wrote:
Using node works without an issue. My guess is .emit and .on functions don't work as well with standard ws
— Reply to this email directly or view it on GitHub.
I get the same error on running on
- server
- node.js v0.10.32
- OSX 10.9.5
- client
- Chrome Version 40.0.2173.0 canary (64-bit)
I changed
var socket = io();
to
var socket = io.connect();
and it works.
Unfortunately I don't know why.