T
tRPC

"This is likely not portable" error

"This is likely not portable" error

Iisaac_way4/18/2023
Randomly started getting this weird error on my front end, can't find anything online on it. Something wrong with my project config, I'm sure It appears on my trpc react but also in some other places:
export const api = createTRPCReact<AppRouter>();
export const api = createTRPCReact<AppRouter>();
Any ideas?
Iisaac_way4/18/2023
had composite: true in the tsconfig.json, removing that fixed it idk why
Nnlucas4/18/2023
I bet @ixahmedxi can tell us I’ve seen this a lot when the api project has dependencies producing types into the API which aren’t available to the client via node_modules Composite might end up relating to that behaviour
AEAhmed Elsakaan4/18/2023
hmm i remember getting this error as well but i completely forgot how i solved it
Nnlucas4/18/2023
Using monorepo module hoisting or installing the dep in both projects generally fixes it But there are other magic tsconfig things I’ve seen people do (quite a bit of history in this forum)
Iisaac_way4/18/2023
hmm I just disabled hoisting to fix some other issue lol probably what caused it to start happening
Nnlucas4/18/2023
You can be more specific in how you disable hoisting, or you can install Prisma into both projects just for the types Or tsconfig tweaks but that seems fragile and might break other stuff too 😅

Looking for more? Join the community!

T
tRPC

"This is likely not portable" error

Join Server
Recommended Posts
Integrate third-party added endpoints into the router definition?Its would be cool but not too important, so I was wondering whether or not it would be possible to hWhy am I seeing 500 errors on responses to clients in production?I'm running my trpc server with NODE_ENV=production with the expressjs adapter, and I'm getting thistrpc auto refreshes page when I lose focusHi, i thought this was a development environment only configuration, but it does it even in productiIncorrect type errorsNo idea if this is a trpc issue, but i'm having a bit of a nightmare with type errors. Nothing is shtest post 2hello againquery debounceHey there ! I wonder if anyone could point me to a standard recipe to achieve query debouncing and Type of createServerSideHelpers?I'm currently trying to implement a helper for `getServerSideProps` to reduce duplication. It's stilhow to set request timeout in clientcreateProxyClient has no option about timeout like axios does. Just in one router request (query or trpc rate limitinghi I am currently having some problems with a race condition in my TRPC nextJS api. Essentially whtrpc pipe middlewareHey all. I'm currently trying to create a middle ware on endpoints using the new `pipe` API. This Has anyone ever used tRPC (with SSR) and i18n?No matter the lib (next-intl, next-i18n, next-translate), I simply stumble from one problem to anothNew to tRPC and Need Help with BasicsI made a new T3 app, but I don't quite understand how tRPC works, and I would love to get some help web socket keeps on disconnecting and connectingHi! Its my first time using web sockets. The first code snippet is my socket code. The second code sPagination QueryHi, I'm new for web dev and I'm moved to tRPC not so long I'm looking for example of pagination quEnrich the response object for TRPC endpointCurrently when I hit a trpc endpoint I get something like: ```typescript { result: { data:Can i fetch tRPC in different project@coco- : I Make a tRPC in my project. Can I use the enpoint api in different project ?Importing AppRouter types from an external repoI've got a production T3 app already in production. I've created a fresh expo app to start building TypeScript type for request object for route handlersSo far I've been writing my routes like: ```typescript export const router = t.router({ helloWorlTyped wrappers for proceduresI have a TRPC client with working queries and mutations. I wanted to create wrapper functions for alAre TRPC server procedures actual endpoints? Meaning can you directly do a `post` request to them?Lets say you have a public procedure called `getHelloWorld`, can you hit it by doing `localhost:3000