Replies: 1 comment 5 replies
-
I think you're initializing the wsLink on the server where there is no websockets. On my phone but a quick hack should be to do |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've tried to follow the docs and the two example apps (simple, advanced) to set up a TRPC server with Websockets and regular HTTP.
I am getting the error "error - ReferenceError: WebSocket is not defined" during the createWSClient() , in the WithTRPC function. I did work for about 5 min, and I do not know why, neither why it did work nor why it stopped since I did not change any of the code.
If anyone has any pointers or general feedback for improvements I'd be grateful.
_app.tsx
[trpc].ts
Websocket server
Main Server
Websocket Router
Page using TRPC over Websocket
Package JSON
Beta Was this translation helpful? Give feedback.
All reactions