It should be due to below reasons
- Socket.IO Version Compatibility:- Please Confirm that both the server and client are using compatible versions of Socket.IO and Make sure both are aligned For example:
Run npm list socket.io on the server.
Run npm list socket.io-client on the client.
- Network or Middleware Issues