Type 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutation
I'm getting this error:
on line:
^ (copy pasted from https://trpc.io/docs/client/react/setup)
These are my relevant package versions:
what am I doing wrong?
Type 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutationCache, logger, defaultOptions, and 4 more.ts(2740)
context.d.ts(48, 5): The expected type comes from property 'queryClient' which is declared here on type 'IntrinsicAttributes & TRPCProviderProps<CreateRouterInner<RootConfig<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { ...; }>, unknown>'
on line:
^ (copy pasted from https://trpc.io/docs/client/react/setup)
These are my relevant package versions:
what am I doing wrong?
Solution
Just run the npm install again and you should be good or downgrade @tanstack/react-query to
@tanstack/query@4