Problem with the WebSockets

Hi Guys Iam trying to make a Simple chat website and when iam trying to do so i faced a error at createContext , Can Somoeone Please Tell me WHat is Wrong ?
3 Replies
Alex
Alex13mo ago
What does your createContext look like? I assume you followed this guide: https://trpc.io/docs/subscriptions
Alex
Alex13mo ago
GitHub
examples-next-prisma-websockets-starter/src/server/context.ts at ma...
🏓 tRPC Next.js WebSocket Starter. Contribute to trpc/examples-next-prisma-websockets-starter development by creating an account on GitHub.
kiran alex ch
kiran alex chOP13mo ago
Yeah I did checkout the repo , I figured out that it's for old version but for newer version it's not working , I did use this at createTRPCcontext but no use , opts: | NodeHTTPCreateContextFnOptions<IncomingMessage, WebSocket> | trpcNext.CreateNextContextOptions, Update : - it's working i forgot to import import { WebSocket } from 'ws';

Did you find this page helpful?