-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Describe the bug
I attempted to upgrade my app to vite 2.4.0-beta.0, but now I get the error:
Uncaught Error: No QueryClient set, use QueryClientProvider to set one
at useQueryClient2 (QueryClientProvider.js:36)
at ReactQueryDevtoolsPanel2 (devtools.js:287)
at renderWithHooks (react-dom.development.js:14985)
at updateForwardRef (react-dom.development.js:17044)
at beginWork (react-dom.development.js:19098)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)
at beginWork$1 (react-dom.development.js:23964)
at performUnitOfWork (react-dom.development.js:22776)
The above error occurred in the <ForwardRef(ReactQueryDevtoolsPanel2)> component:
at ReactQueryDevtoolsPanel2 (http://localhost:8080/node_modules/.cache/vite/react-query_devtools.js?v=7bc19b7b:4736:26)
at ThemeProvider (http://localhost:8080/node_modules/.cache/vite/react-query_devtools.js?v=7bc19b7b:4013:24)
at footer
at ReactQueryDevtools (http://localhost:8080/node_modules/.cache/vite/react-query_devtools.js?v=7bc19b7b:4547:32)
at QueryClientProvider2 (http://localhost:8080/node_modules/.cache/vite/react-query.js?v=7bc19b7b:2438:21)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
I verified that downgrading to vite 2.3.8 resolves the error, and have created a minimal reproduction.
Reproduction
https://github.com/IanVS/vite-2.4.0-react-query-issue
System Info
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 29.71 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.16.1/bin/yarn
npm: 7.17.0 - ~/.nvm/versions/node/v14.16.1/bin/npm
Browsers:
Brave Browser: 91.1.26.67
Firefox: 88.0.1
Safari: 14.1.1
npmPackages:
vite: ^2.4.0-beta.0 => 2.4.0-beta.0Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Reactions are currently unavailable