Skip to content

TanStack Start 1.161.1 + react-store 0.9.1 causes “Cannot set property state of #<Store> which has only a getter” #6703

@Andresuito

Description

@Andresuito

Which project does this relate to?

Router

Describe the bug

Using TanStack Start/Router 1.161.1 with a direct dependency on @tanstack/store@0.9.1 / @tanstack/react-store@0.9.1 causes a runtime crash during router creation: “Cannot set property state of # which has only a getter”. pnpm why shows Router/Start pulling @tanstack/store@0.8.1 while the app pulls 0.9.1; aligning to 0.8.1 fixes it.

Your Example Website or App

No reproduction URL yet.

Steps to Reproduce the Bug or Issue

  1. Create a TanStack Start 1.161.1 app (vite 7.3.1).
  2. Add direct dependencies @tanstack/store@0.9.1 and @tanstack/react-store@0.9.1 in the app.
  3. Ensure router/start bring @tanstack/store@0.8.1 (e.g. via @tanstack/react-start@1.161.1).
  4. Start the app and instantiate the router (createRouter).
  5. Observe runtime error.

Expected behavior

Router should initialize without crashing even if app depends on a newer @tanstack/store (or the dependency tree should be de-duplicated/compatible).

Screenshots or Videos

N/A

Platform

  • Router / Start Version: 1.161.1
  • OS: macOS
  • Browser: Chrome
  • Browser Version: Unknown
  • Bundler: vite
  • Bundler Version: 7.3.1

Additional context

pnpm why @tanstack/store shows @tanstack/store@0.8.1 required by Router/Start, while the app uses 0.9.1. Forcing everything to 0.8.1 via overrides resolves the crash.

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