ts-rest / ts-rest

RPC-like client, contract, and server implementation for a pure REST API
https://ts-rest.com
MIT License
2.31k stars 108 forks source link

No QueryClient set, use QueryClientProvider to set one #590

Closed alex-way closed 5 months ago

alex-way commented 5 months ago

Describe the bug

When trying to run the simple example repo: https://github.com/ts-rest/example-next with the dependencies updated to latest you run into an error: "No QueryClient set, use QueryClientProvider to set one"

How to reproduce

  1. Clone https://github.com/alex-way/ts-rest-bug
  2. pnpm i
  3. pnpm dev
  4. Go to http://localhost:3000

Expected behavior

The pokemon data loads as expected

Code reproduction

https://github.com/alex-way/ts-rest-bug

ts-rest version

3.44.1

Gabrola commented 5 months ago

You are using @tanstack/react-query v5 which is not supported yet. Install v4 instead.