-
I have a TypeScript NextJS app that uses Output File Tracing in production. It's not including import {
QueryClientProvider,
QueryClient,
Hydrate,
} from "@tanstack/react-query";
const isDev = process.env.NODE_ENV === "development";
let ReactQueryDevtools = () => null;
if (isDev) {
ReactQueryDevtools =
require("@tanstack/react-query-devtools").ReactQueryDevtools;
}
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
const { dehydratedState, title, ...restPageProps } = pageProps;
const [queryClient] = React.useState(() => new QueryClient());
return (
<QueryClientProvider client={queryClient}>
<Hydrate state={dehydratedState}>
<Layout
title={title}
menu={navigation}
userMenu={userMenu}
Component={Component}
pageProps={restPageProps}
/>
</Hydrate>
<ReactQueryDevtools />
</QueryClientProvider>
);
} But I get an error when I try to run the project:
I wonder if you can actually mix |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem was that I installed the package |
Beta Was this translation helpful? Give feedback.
The problem was that I installed the package
@tanstack/react-query-devtools
asdevDep
instead ofdep
which caused problem with the NextJS Output File Tracing feature.