Reference: io is not defined
I need some help please how can I fix this problem. "io is not defined" this is how I initialize the socket.io
<script src="http://publicip:1333/socket.io/socket.io.js"></script>
This is in separate file called "myjs.js";
var socket = null;
$(function(){
socket = io.connect('http://publicip:1333');
//some js code here...
});
what makes me wrong in initializing the socket.io ?
Thank you in advance.
You are loading "myjs.js" after the socket.io script?
I wonder if your socket.io.js script loads. Usually, you have to move it to a more accessible folder ar node_modules folder can't be accessed directly from browser. Better, store the client side socket.io (Look in readme for url) in a "public" directory.
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).