node.js - Connection bug with socket.io-client (Server to Server) -


i have problem socket.io-client normaly when connect clientws serverws try connect in loop if serverws not started.

i tried in simple node app , work, when i'm trying include in project got error:

.../node_modules/socket.io-client/lib/manager.js:75     this.nsps[nsp].emit.apply(this.nsps[nsp], arguments);                         ^ typeerror: cannot call method 'apply' of undefined     @ manager.emitall (.../node_modules/socket.io-client/lib/manager.js:75:25)     @ null._ontimeout (.../node_modules/socket.io-client/lib/manager.js:464:12)     @ timer.listontimeout [as ontimeout] (timers.js:110:15) 16 mar 21:54:03 - [nodemon] app crashed - waiting file changes before starting... 

and it's same connection code in both project :

var socket = require("socket.io-client"); var ws = socket("http://localhost:3000"); 

so don't know problem...

(tested socket.io , socket.io-client 1.3.5)


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -