Hi I can't build my next14 + react query + ky project. I want to consume a REST API with react query inside my next14 project. It works perfectly in dev mode, but when I try to build I get an error basically saying : Error: No QueryClient set, use QueryClientProvider to set one. I set a QueryClientProvider in layout.tsx file as said here : https://tanstack.com/query/v4/docs/framework/react/guides/. Here is an OSS reproduction of this bug with details about the issue in the README : https://github.com/Courtcircuits/next14-react-query-error. I've been battling with this for two days and found no solution on StackOverflow or next's github issue
I tried to restart the project from scratch, tried to install different versions of @tanstack/react-query.