Skip to content

TanStack Start throws Cannot read properties of undefined (reading 'mutations') during query hydration on fresh install #8158

Description

@saeid-ebrahimi127
Image Image

Which project does this relate to?

Start

Describe the bug

A freshly created TanStack Start application throws the following error in the browser console immediately after running the development server.

Error
Error reading query stream: TypeError: Cannot read properties of undefined (reading 'mutations')
at hydrate (modern-BN-gG8-L.js?v=975f2576:425:18)
at handle (@tanstack_react-router-ssr-query.js?v=73f9cd6e:103:5)

The error occurs immediately after running:

bun run dev

and opening the application in the browser.

Complete minimal reproducer

https://github.com/saeid-ebrahimi127/tanstack-start-project

Steps to Reproduce the Bug

  1. Create a new TanStack Start with: tanstack create tanstack-start-project --no-intent --package-manager bun --no-install (tanstack cli)
  2. Install the dependencies.
  3. Run:
    bun run dev
  4. Open the development server in the browser.
  5. Check the browser console.

The error appears without adding any custom application logic.

Expected behavior

A newly created TanStack Start application should start successfully without errors in the browser console.

Screenshots or Videos

No response

Platform

OS: [Windows / macOS / Linux]
Bun: 1.4.0
Node: v24.19.0
Vite: 8.2.2
@tanstack/react-start: 1.168.49
@tanstack/react-router: 1.170.32
@tanstack/react-router-ssr-query: 1.167.1
@tanstack/react-query: 5.102.2

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