WebSocket is already in CLOSING or CLOSED state Socket io
问题 Socket io returning error as: WebSocket is already in CLOSING or CLOSED state Socket io. Node JS: socket.to(socketId).emit('details', { userdetails: username }); React JS: socket.on('details', data => { console.log(data.userdetails); }); Can you please help me to resolve issue of WebSocket is in closing or closed state. Any kind of help is appreciable. 回答1: 1) Roll back to socket.io-client version 2.0.3. There is an issue in the latest 2.1.1 version. npm install socket.io-client@2.0.3 --save