原因:

socket.io-client 版本和服务器 socket.io 版本不匹配
socket.on('connect_error', e => {
  console.log('connect_error', e);
});

可输出看连接错误日志。

posted on 2022-01-01 15:39  W1N9s  阅读(1697)  评论(0)    收藏  举报