why this error is coming
I used the socket.io.client in my node script for making simulate browser client in my node.js, when i am including by io=require('./socket.io.client').io,
it is giving me this error :
node.js:178
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'indexOf' of undefined
at /home/reach121/socket7youngib/lib/socket.io.client.js:1023:24
at Object.
Looks, like you are trying to use client-library which is targeted for in-browser use, not in node.js.
Yes, any suggestion for using in node.js
- This is not a bug, please ask such questions in the mailing list
- You need to require socket.io not socket.io-client