BillyBob
Server Error: client[procedureType] is not a function [ tRPC v10.45.2 OR v11 ] [ NextJS v14.1.X ]
I solved it.
This was due to having
use server
at the top of my server.ts file for interacting with tRPC on the server side.
I replaced it with import server-only
to discover this issue I followed the error to the code within node_modules
node_modules/.pnpm/@trpc+client@11.0.0-next.320_@trpc+server@11.0.0-next.320/node_modules/@trpc/client/dist/createTRPCClient.mjs
added some debugging like so:
From here I got a new error. Which was saying the server.ts
tRPC connecter was exporting a non-async function, which you cannot do if marking the file at the top with use server
I removed the use server
from the top, replaced with use server-only
removed the debugging lines added as shown above and it worked.7 replies
TypeError: client[procedureType] is not a function
thanks @emil
Here is my current issue:
https://discord.com/channels/867764511159091230/1221402424405790780
If you can help in any way its appreciated
16 replies
Server Error: client[procedureType] is not a function [ tRPC v10.45.2 OR v11 ] [ NextJS v14.1.X ]
link to repo: https://github.com/lwears/ReelScore
7 replies