Node.js: error GET http://undefined/socket.io/1/?t=1357634942292

I am running a Node.js app, while loading the url i am getting a error like below:

    GET http://undefined/socket.io/1/?t=1357634942292  

on trying to send a message another error is produced , which is

Uncaught TypeError: Object # has no method 'send'

EDIT: I have used a function

  client.broadcast.send({ announcement: client.sessionId + ' connected' });

now the error arising is TypeError:Property 'broadcast' of object # is not a function

Can anybody help me out what might have gone wrong in here?

Cheers Jeev

how about sharing the client initialisation code?

i guess your io.connect method is called wrong. you do it like io.connect(); where it needs to be: io.connect("http://yourdomain.tld");

did you find the awnser for this? My best tip is to check that you specified io.connect('localhost:6666') or wherever you set up your site, as in that question

refer this it will be helpfull for you. Thanks