-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed as not planned
Description
Describe the bug
I'm trying to reproduce an issue in a different library (for reference issue: flightcontrolhq/superjson#196, PR: flightcontrolhq/superjson#197). For that I'm using QueryClient and dehydrate, but I'm getting the following error:
Cannot find module 'react' from 'node_modules/@tanstack/react-query/build/cjs/react-query/src/useQueries.js'
Require stack:
node_modules/@tanstack/react-query/build/cjs/react-query/src/useQueries.js
node_modules/@tanstack/react-query/build/cjs/react-query/src/index.js
src/index.test.tsThis is the whole test:
const queryClient = new QueryClient();
const input = { props: { dehydratedState: dehydrate(queryClient) } };
const stringified = SuperJSON.stringify(input);
const parsed: any = SuperJSON.parse(stringified);
expect(parsed).toEqual(input);Your minimal, reproducible example
https://codesandbox.io/s/tanstack-query-react-dependency-bnkx3l?file=/src/index.test.js
Steps to reproduce
- Go to the reproduction codesandbox
- Go to the tests tab
- The test doesn't pass
Expected behavior
I think the test should pass, since it's not using any hook, just the QueryClient and dehydrate.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: MacOS
- Browser: Brave
- Version: 1.39.11
react-query version
4.2.1
TypeScript version
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels