T
tRPC

❓-help

createTRPCReact transformers getting type error

AHArsalan Hussain12/2/2023
No description
No description
AHArsalan Hussain12/2/2023
I am using same transformer on both front nand backend
No description
AHArsalan Hussain12/4/2023
superjson version 1.9.1 on both sides I tried latest but it ws giving esm errors that I could not sloved so backed to 1.9.1 which also used in creeate-t3-app ??
Nnlucas12/4/2023
It looks like typescript doesn’t understand the default import Tsconfig has a couple different flags you can enable to support default imports when they’re not set up in a particular way by the package Just do a autocomplete on default and import and try enabling those flags
AHArsalan Hussain12/4/2023
I have tried it but did not resolve the error
Nnlucas12/4/2023
What have you tried?
AHArsalan Hussain12/4/2023
the flag you are referring is I understand is allowSyntheticDefaultImports which is set to true
Nnlucas12/4/2023
There’s also esmoduleinterop which has solved similar issues for me Looks like you need to play with the way you’re importing though, there might be some other difference in your module system between frontend and backend

Looking for more? Join the community!

Recommended Posts
Have anyone tried migration from TRPC router to app router apiI was learning the trpc and I wanna know to go back and forth with trpc and restapi. can anyone knowHas anyone integrated trpc + udp (quic/webtransport api)?Hi all, I'm thinking about taking advantage of quic for a certain part of my project. Basically I'm onSuccess invalidateI'm trying to follow along with Theo's T3 tutorial using the latest Next version and the app routerReact Query client and caller client under one objectWould love to know if it is possible to have caller and react query clients under one object? I feeI want to refetch and set the inital data of an useStateHello guys, currently i am retrieving the data i use in useState with `SSR`, but i want to use someVanilla Client Error HandlingWhat is the right way to handle errors when using the vanilla client? If I setup a client like so: sidebar searchPlease how will I implement a search on the left sidebar to let the items on the search bar be searcWS with TRPC```ts │  Type '({ req, res, }: { req: Request; res: Response; }) => CreateInnerContextOpts' is tRPC is butchering object types in return typesSo if I have a mutation that returns this type ```ts { name?: string } ``` the type that tRPC infersWhy my Authorization does not update ?i have this in `_app.tsx` ```export default function App({ Component, pageProps }: AppProps) { retTypeError: queryClient.getMutationDefaults is not a function (it is undefined)Hi! There's not much code to show here, as I'm really not sure where the error actually occurs. InuseQuery never returning or hitting APII have something off in my configuration, i copied most of the files from the `❯ npm create t3-app@lType 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutationI am trying to setup a new project and doing my first client side query and getting this error: ```trpc mutation call stuckI have an issue with a simple mutation procedure: `getPublicUser: publicProcedure .input(z.objeCreate client based on OpenAPIHi! I am running a golang server with an openapi spec and would love to use trpc client in my fronteTRPC with react query, getting error twice?When i am try to show TRPC error in the client side with react-query, i am getting error twice from Error building create-t3-app: Page couldn't be rendered statically because it used `cookies`I get the following error when building create-t3-app: ``` TRPCClientError: Dynamic server usage: PaCompressing parts of query/mutation inputHi, I'm using trpc with the proxyclient for typesafety but recently hit an obstacle where some strin`useSuspenseQuery` still runs a fetch on SSR even when setting `ssr: false` in the api configBeside double-fetching, this causes issues during rendering if you have auth on your routes as the SUnsubscription callback triggering immediatelyHey! I am currently using Bun that's queried via a Vue application. For some reason the unsubscribe