-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'on' of undefined #374
Comments
I encountered a similar issue. Have you found a solution to this issue @fliespl ? I used TS way to create my redisAdapter, the code snippet is here:
Then if I do |
@cinout yes, I did it like that. Hooked events on custom defined sub/pubClient without going through redisAdapter.pubClient.
|
@fliespl That works. Thank you for the help! |
Arf, that is indeed a change in the latest release that wasn't updated in the documentation, sorry for that. I think the best way for now is to provide your own redis clients, as suggested above. |
BREAKING CHANGE: the library will no longer create Redis clients on behalf of the user. Before: ```js io.adapter(redisAdapter({ host: "localhost", port: 6379 })); ``` After: ```js const pubClient = createClient({ host: "localhost", port: 6379 }); const subClient = pubClient.duplicate(); io.adapter(redisAdapter(pubClient, subClient)); ``` Related: - #314 - #374
Version: 6.0.1
I am curious if documentation is still valid, cause example from it fails immediately.
The text was updated successfully, but these errors were encountered: