You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug
I am trying to integrate the Redis Streams adapter@0.2.1 with ioredis@5.4.1 and socket.io@4.7.5
// Typescript
import http from "http";
import { Server } from "socket.io";
import { Redis } from "ioredis";
import { createAdapter } from "@socket.io/redis-streams-adapter";
const io = new Server<ClientToServerEvents, ServerToClientEvents, InterServerEvents, SocketData>(httpServer, {
/* configuration options */
})
io.adapter(createAdapter(new Redis()));
And I'm getting an error with io.adapter(createAdapter(new Redis()))
Argument of type '(nsp: any) => RedisStreamsAdapter' is not assignable to parameter of type 'AdapterConstructor'.
Type '(nsp: any) => RedisStreamsAdapter' is not assignable to type '(nsp: Namespace<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap, any>) => Adapter'.
Type 'RedisStreamsAdapter' is missing the following properties from type 'Adapter': nsp, rooms, sids, encoder, and 34 more.ts(2345)
Platform:
OS: MacOS
Nodejs: 20.11.0
The text was updated successfully, but these errors were encountered:
Hi! Could you please check your version of socket.io-adapter with npm ls socket.io-adapter? It is imported by both socket.io and @socket.io/redis-streams-adapter packages, and the versions should match.
The bug
I am trying to integrate the Redis Streams adapter@0.2.1 with ioredis@5.4.1 and socket.io@4.7.5
And I'm getting an error with
io.adapter(createAdapter(new Redis()))
Platform:
The text was updated successfully, but these errors were encountered: