Closed Hovhanns97 closed 3 years ago
It sounds like a compatibility issue. Which version of socket.io-redis
/ socket.io
are you using?
Related: https://github.com/socketio/socket.io-redis-adapter/issues/402
I am using these versions. "socket.io": "4.0.1", "socket.io-client": "^4.1.2", "socket.io-redis": "^6.1.0",
This should be fixed with socket.io-redis@6.1.1
, could you please try to run npm update
?
Closed due to inactivity, please reopen if needed.
In my application, I have used a socket.io and also an adapter for it. Now when I try to send a response from the server to the frontend with socket.to(id).emit("message", message), it throws this error
It starts working again after I comment on the code that configures the adapter.
io.adapter(require("socket.io-redis")({host: "localhost", port: 6379}))
But it's not a good solution, because I need to use the adapter for my application. How can I fix this problem in another way?