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 new ioredis package bundles its own TS types now and when passing in the redis instance to the connection of the Queue I get:
Type 'Redis' is not assignable to type 'ConnectionOptions | undefined'.
Type 'Redis' is missing the following properties from type 'Cluster': nodes, rpushBuffer, lpushBuffer, hsetBuffer, and 2 more.ts(2322)
Investigating I see that the connection property is expecting a Redis type based off the @types/ioredis package, and it doesn't seem to match the with the new one.
bullmq v1.78.1
ioredis v5.0.2
Reverting to old ioredis fixed ts issue
The text was updated successfully, but these errors were encountered:
JClackett
changed the title
Error passing in Redis instance to connection
Error passing in ioredis v5 instance to connection
Mar 30, 2022
This seems to become an issue when you have dependencies installed which bring in @types/ioredis- in my case @types/connect-redis. This makes the TypeScript compiler pick up those types which probably clash with the now built-in types of ioredis >= 5.
The new ioredis package bundles its own TS types now and when passing in the redis instance to the connection of the Queue I get:
Investigating I see that the connection property is expecting a Redis type based off the @types/ioredis package, and it doesn't seem to match the with the new one.
bullmq v1.78.1
ioredis v5.0.2
Reverting to old ioredis fixed ts issue
The text was updated successfully, but these errors were encountered: