get-convex / convex-react-query

Apache License 2.0
6 stars 0 forks source link

Typescript error: Property #private in type QueryClient refers to a different member that cannot be accessed from within type QueryClient #6

Open paschaldev opened 1 month ago

paschaldev commented 1 month ago
Screenshot 2024-10-13 at 11 13 25

Type Error, private property in tanstack query client vs convex query client

thomasballinger commented 1 month ago

@paschaldev What versions of Convex and @convex-dev/react-query is this with? I'm not getting this in TanStack Start.

thomasballinger commented 2 weeks ago

This is an issue with having two different copies of @tanstack/query-core installed or having two sets of types used for the same library. Can you try reinstalling your dependencies?

@convex-dev/convex-react-query uses @tanstack/react-query as a peer dependency, so there should just be one version involved.

If this is a situation that happens reasonably we can change ConvexQueryClient.connect(queryClient) to accept a looser type, but we'd need to understand what situation this can happen in.

thomasballinger commented 2 weeks ago

@paschaldev if you've got a repo I'd love to see, otherwise going to close this in a few days.