question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript error TS2339 Property 'remoteJoin' does not exist on type 'Adapter'.

See original GitHub issue

Describe the bug Type error related to @socket.io/redis-adapter. remoteJoin or any other method of the redis adapter package throws a TS error.

error TS2339: Property 'remoteJoin' does not exist on type '{ (): AdapterConstructor | undefined; 
(v: AdapterConstructor): Server<DefaultEventsMap, DefaultEventsMap, DefaultEventsMap>; }'.

94           fastify.io.adapter.remoteJoin(

There is a small possibility that i just don’t know how to make types match when this kind of internal related parts of the project is changed (like extending default adapter with a custom adapter) but I was using the same setup for JS project and there was no problem related to functionality. So I am thinking it’s just my insufficient knowledge of TS, but i wanted to post an issue anyway

To Reproduce The same type error can be reproduced with this small project that i made: https://github.com/outranker/socket.io-redist-adapter-type-error-reproduce

To run the project, first npm run watch in the terminal and open new terminal and type npm run start

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
outrankercommented, Jan 1, 2022

Thank you for sharing your solution! I will give it a try when i get to my laptop

I will let you know how it goes in my app when i do try it

0reactions
darrachequesnecommented, Jan 3, 2022

@komodoUSA yes, it does work with multiple nodes. I’ll try to make that clearer in the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property 'remoteJoin' does not exist on type 'Adapter'
I am trying to use @socket.io/redis-adapter with my express/Typescript app and I am following the documentation for it but I can't get it...
Read more >
Strongly Typed Realtime Programming with TypeScript
In this article we'll explore how to make socket communication more secure and robust. But first let's review some concepts. A 2 minute...
Read more >
socket.io-redis - npm
io-redis adapter you can run multiple Socket.IO instances in different processes or servers that can all broadcast and emit events to and from ......
Read more >
Server API - Socket.IO
import { createAdapter } from "@socket.io/redis-adapter"; ... Only closing the underlying HTTP server is not sufficient, as it will only ...
Read more >
Socket.io-redis NPM
TypeScript. // npm i -D @types/redis import { Server } from 'socket.io'; ... IO with the socket.io-redis adapter you can run multiple Socket....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found