-
Notifications
You must be signed in to change notification settings - Fork 485
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
TypeError: Cannot read property 'encode' of undefined #222
Comments
I'm having the same issue **Update Holy cow, i tried your solution and it work. How come you know what to change in that index.js. I know the error is pointing to that but how did you come up by changing the "server" to "adapter"? Cheers |
As noted in the release note, Related: socketio/socket.io-adapter#47 |
@darrachequesne Thanks, my bad for not reading the release notes. |
I have this issue with @marcosc90 's solution helped, but it's not acceptable to make such changes |
@olegmdev May I ask what you do mean? |
I meant to make changes inside dependent node_modules sources, nevermind. Rolling back to |
Iam rolling back to socket.io-redis@5.0.0 likve @olegmdev mentioned, but not work |
This is my package.json
|
Worked only when i update socket.io to 2.x |
I'm having this problem, I'm using socket.io 2.1.1 and socket.io-redis 5.2.0 any ideas? |
I used patch-package to make the change @marcosc90 suggested, and it works. Is this a bug? Can it be fixed? I'm working on a legacy Sails 0.12 app and it is not feasible to upgrade at this time so this is the solution I will have to go with. |
When using socket.io-redis@5.0.1 I get the following error:
My code:
I fixed it changing this line:
this.encoder = nsp.server.encoder;
with:
this.encoder = nsp.adapter.encoder;
in
socket.io-redis/node_modules/socket.io-adapter/index.js
But I really don't think I should be doing that.
Info:
OS: Ubuntu 16.04 64-bit
├─┬ socket.io@1.7.3
│ └── socket.io-adapter@0.5.0
└─┬ socket.io-redis@5.0.1
└── socket.io-adapter@1.1.0
The text was updated successfully, but these errors were encountered: