After upgrade socket.io to 4.2.0, get type error with redis-adapter
See original GitHub issueDescribe the bug After upgrade socket.io to 4.2.0, get type error
To Reproduce
Please fill the following code example:
Socket.IO server version: 4.2.0
Server
import { Server } from 'socket.io';
import { createAdapter } from '@socket.io/redis-adapter';
import { RedisClient } from 'redis';
const io = new Server(8080);
const pubClient = new RedisClient({ host: 'localhost', port: 6379 });
const subClient = pubClient.duplicate();
io.adapter(createAdapter(pubClient, subClient));
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Troubleshooting connection issues | Socket.IO
Common errors: the server might not be reachable. Please make sure the Socket.IO server is actually reachable at the given URL.
Read more >Newest 'socket.io-redis' Questions - Stack Overflow
TypeError on socket.io adapter. For using multiple nodes in my socket.io as part of expanding I used the Redis socket.io adapter @socket.io/redis-adapter.
Read more >socket.io - npm
Start using socket.io in your project by running `npm i socket.io`. ... TypeScript icon, indicating that this package has built-in type ...
Read more >Socket-IO Redis error - NodeBB
New problem! Again, getting everything up to v1.17.0. We run clustered, so now we need redis (we run a postgresql DB for a...
Read more >@nhuttm/socket.io-redis - npm package | Snyk
Learn more about @nhuttm/socket.io-redis: package health score, popularity, ... The redis adapter instances expose the following properties that a regular ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I could indeed reproduce, let me check.
Actually, I could not reproduce: https://github.com/socketio/socket.io-fiddle/tree/issues/socket.io-redis/419
The message in the stack trace suggests a different version of the
socket.io-adapter
, could you please runnpm ls socket.io-adapter
?