Open Charles101993 opened 7 years ago
Seems like io.use( 'some literal', function(){} ) used instead of io.use( function(){} ) when migrated to socket >1.0.
I have been getting this error when I applying authorization middleware - io.use(authorizerUser)
This error originates in the namespace.js file inside of the socket.io module. This happens when io.use(p2p) has been called and another person attempts to connect. This happens both for my own socket.io project and the chat example that I used to debug the original issue. I used browserify both times to create my bundle.js file and have made only minor modifications to the require('') commands in the index.js file(inside socket.io-p2p-master) to elucidate the path for the node.js modules. Below is the run function inside namespace.js (which is where the error occurs). I'm not sure exactly what files are relevant but I've attached is my bundle.js file that I generated using browserify. I've gotten this error for my original project and the example so it may be my machine (windows) but I'm wondering if anyone else has had this problem as well.
bundle.zip