Skip to content

"Cannot read properties of undefined (reading 'update')" in latest @tanstack/react-router-ssr-query version #4902

Closed

Description

@revosw

Which project does this relate to?

Start

Describe the bug

When loading the website, the "Cannot read properties of undefined (reading 'update')" error happens

Your Example Website or App

https://codesandbox.io/p/sandbox/github/revosw/tanstack-start-start-request-resolver

Steps to Reproduce the Bug or Issue

  1. install @tanstack/react-router-ssr-query
  2. use setupRouterSsrQueryIntegration in router.tsx
  3. run vite dev

Expected behavior

The site should load without problems

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.131.2
  • OS: Windows
  • Browser: Edge
  • Browser Version: Version 139.0.3405.86 (Official build) (64-bit)
  • Bundler: vite
  • Bundler Version: 7.1.1
"dependencies": {
    "@tanstack/react-query": "^5.84.2",
    "@tanstack/react-router": "1.131.2",
    "@tanstack/react-router-devtools": "1.131.2",
    "@tanstack/react-router-ssr-query": "^1.131.2",
    "@tanstack/react-start": "1.131.2",
    "react": "19.1.1",
    "react-dom": "19.1.1"
},
"devDependencies": {
    "@biomejs/biome": "^2.1.4",
    "@tailwindcss/vite": "^4.1.11",
    "@tanstack/react-query-devtools": "^5.84.2",
    "@tanstack/router-cli": "^1.131.2",
    "@tanstack/router-devtools": "^1.131.2",
    "@types/node": "24.2.1",
    "@types/react": "19.1.9",
    "@types/react-dom": "19.1.7",
    "@vitejs/plugin-react": "^5.0.0",
    "tailwindcss": "4.1.11",
    "typescript": "5.9.2",
    "vite": "^7.1.1",
    "vite-plugin-devtools-json": "^0.4.1",
    "vite-tsconfig-paths": "^5.1.4"
},

Additional context

No response

Activity

  1. schiller-manuel commented on Aug 9, 2025

    @schiller-manuel
    Collaborator

    the codesandbox does not use the @tanstack/react-router-ssr-query package. can you please provide a complete example?

  2. revosw commented on Aug 10, 2025

    @revosw
    Author

    Ahh codesandbox is so frustrating regarding problems around syncing the codesandbox with new git changes. I recreated the entire codesandbox and updated the link in my original answer with this:

    https://codesandbox.io/p/sandbox/github/revosw/tanstack-start-start-request-resolver

  3. schiller-manuel commented on Aug 10, 2025

    @schiller-manuel
    Collaborator

    you need to return the router as shown in the docs

    setupRouterSsrQueryIntegration({
            router,
            queryClient
        });
    	return router
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