Skip to content

Cannot read properties of undefined (reading 'fetchStatus') #10744

Description

@ifxnas

Describe the bug

Im unable to use devtools in production. When I open the Tanstack query devtool, I get the following issues:

Image

Only happens in prod build. When running locally its fine.

import { TanStackDevtools } from "@tanstack/react-devtools"
import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools/production"

...

<TanStackDevtools
        plugins={[
          {
            name: "TanStack Query",
            render: <ReactQueryDevtoolsPanel client={queryClient} />,
            defaultOpen: true,
          },
          formDevtoolsPlugin(),
        ]}
/>

The versions:

{
    "@tanstack/react-devtools": "0.10.5",
    "@tanstack/react-query-devtools": "5.100.11"
}

Your minimal, reproducible example

N/A

Steps to reproduce

  1. Install those deps as shown above
  2. Run yarn build. Im using Vite
  3. Run yarn preview
  4. Open Tanstack devtool
  5. Observe that you'll get Cannot read properties of undefined (reading 'fetchStatus')

Expected behavior

Expected behaviour should be that I show be seeing the tanstack queries in devtool

How often does this bug happen?

Every time

Screenshots or Videos

Image Image

Platform

MacOS

Tanstack Query adapter

None

TanStack Query version

5.100.11

TypeScript version

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions