question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After upgrade socket.io to 4.2.0, get type error with redis-adapter

See original GitHub issue

Describe 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 2021-08-30 at 6 26 PM

Ref: https://github.com/socketio/socket.io/issues/4066

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
darrachequesnecommented, Sep 14, 2021

I could indeed reproduce, let me check.

1reaction
darrachequesnecommented, Sep 22, 2021

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 run npm ls socket.io-adapter?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found