0👍
✅
You use the wrong module in client side, please use socket.io-client, for example:
var sio = require('socket.io-client')
var socket = sio('http://localhost:5000')
Source:stackexchange.com