Skip to content

Devtools popup throws Uncaught TypeError: undefined is not a function trying to open it as popup/separate window #299

@tufailra97

Description

@tufailra97

Which project does this relate to?

Router

Describe the bug

Hi 👋,

I’m using Rsbuild with React, TanStack Router, and TanStack Query. Everything works great except the TanStack Devtools popup.

The devtools UI renders, and the popup icon appears, but clicking the popup icon crashes with this error in the console:

Uncaught TypeError: undefined is not a function

in here

import.meta.hot?.on("vite:beforeUpdate", () => {
  localStorage.setItem("pip_open", "false");
  closePipWindow();
});

Your Example Website or App

n/a

Steps to Reproduce the Bug or Issue

  1. Start a React app using Rsbuild + TanStack Router + TanStack Query.
  2. Enable the TanStack devtools.
  3. Open the devtools panel and click the popup icon.

Expected behavior

Popup window should open correctly, as it does when using Vite.

Screenshots or Videos

Screen.Recording.2025-12-27.at.14.44.37.mov

Platform

  • Router: [1.131.2]
  • OS: [macOS]
  • Browser: [Chrome]
  • Bundler: [rsbuild]
  • Bundler Version: [1.5.4]

Additional context

No response

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