When using @socket.io/redis-streams-adapter with ioredis, the application fails to start due to an unresolved module error. It appears that redis npm package is required, despite using ioredis.
Steps to Reproduce:
Set up a new project with the dependencies listed below.
Use the provided code snippet in main.ts.
Run the project.
Here is a minimal reproducible example:
// main.ts
import { Redis } from "ioredis";
import { Server } from "socket.io";
import { createAdapter } from "@socket.io/redis-streams-adapter";
const redisClient = new Redis();
const io = new Server({
adapter: createAdapter(redisClient)
});
io.listen(3000);
When using
@socket.io/redis-streams-adapter
withioredis
, the application fails to start due to an unresolved module error. It appears thatredis
npm package is required, despite usingioredis
.Steps to Reproduce:
Here is a minimal reproducible example:
Expected Behavior: The adapter should work using
ioredis
without requiring theredis
package.Actual Behavior: Throws an error stating that the
redis
module cannot be found.Logs: