Skip to content

HMR issue with Bun runtime #6034

Closed
Closed

Description

@OliverHeward

Which project does this relate to?

Start

Describe the bug

Using the Bun runtime, in both 1.2 and 1.3 seems to cause issues for HMR.

When creating a tanstack application with the install command using the Bun runtime, making changes to files takes ~2-10 minutes, depending on whether or not Nitro() is added or removed from the vite.config.ts.

The same issue occured on multiple projects I created using different versions of the bun runtime, also present on multiple browsers, such as Firefox, Chrome etc.

When HMR has not yet worked, reloading the page causes a Hydration error Server vs Client issue.

Your Example Website or App

https://github.com/OliverHeward/tanstack-bun-minimal

Steps to Reproduce the Bug or Issue

  1. Create a new starter project with bun create tanstack/start@latest
  • Choose a project name.
  • Set up a basic project, installing tailwind, biome, nitro (default), no other installs.
  1. Navigate to project and start cd [name] && [editor] . && bun run dev
  2. In the code editor, navigate to src/routes/index.html
  3. Delete lines 58>94
  4. HMR does not kick in

Stop the process after waiting too long, and remove Nitro() from vite.config.ts

Repeat process 4.

Included tests were changing className on an element to see if HMR worked for elements present in the document, and including new elements such has a <h1>Hello World!</h1>

Expected behavior

Would expect the behaviour...

Developer saves file, file is picked up as changed by underlying tech behind HMR, and the app is recompiled / bundled for client.

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

Package list for this specific project:

├── @biomejs/biome@2.2.4
├── @tailwindcss/vite@4.1.17
├── @tanstack/devtools-vite@0.3.11
├── @tanstack/react-devtools@0.7.11
├── @tanstack/react-router@1.139.14
├── @tanstack/react-router-devtools@1.139.15
├── @tanstack/react-router-ssr-query@1.139.14
├── @tanstack/react-start@1.139.14
├── @tanstack/router-plugin@1.139.14
├── @testing-library/dom@10.4.1
├── @testing-library/react@16.3.0
├── @types/node@22.19.1
├── @types/react@19.2.7
├── @types/react-dom@19.2.3
├── @vitejs/plugin-react@5.1.1
├── jsdom@27.2.0
├── lucide-react@0.544.0
├── nitro@3.0.1-alpha.1
├── react@19.2.1
├── react-dom@19.2.1
├── tailwindcss@4.1.17
├── typescript@5.9.3
├── vite@7.2.6
├── vite-tsconfig-paths@5.1.4
├── vitest@3.2.4
└── web-vitals@5.1.0

Package list for project this was noticed on: (Bun@1.2.16)

├── @biomejs/biome@2.2.4
├── @tailwindcss/vite@4.1.17
├── @tanstack/devtools-vite@0.3.11
├── @tanstack/react-devtools@0.7.11
├── @tanstack/react-router-devtools@1.139.15
├── @tanstack/react-router-ssr-query@1.139.14
├── @tanstack/react-router@1.139.14
├── @tanstack/react-start@1.139.14
├── @tanstack/router-plugin@1.139.14
├── @testing-library/dom@10.4.1
├── @testing-library/react@16.3.0
├── @types/node@22.19.1
├── @types/react-dom@19.2.3
├── @types/react@19.2.7
├── @vitejs/plugin-react@5.1.1
├── jsdom@27.2.0
├── lucide-react@0.544.0
├── nitro@3.0.1-alpha.1 invalid: "latest" from the root project
├── react-dom@19.2.1
├── react@19.2.1
├── tailwindcss@4.1.17
├── typescript@5.9.3
├── vite-tsconfig-paths@5.1.4
├── vite@7.2.6
├── vitest@3.2.4
└── web-vitals@5.1.0

Activity

  1. gabenddos commented on Jan 6, 2026

    @gabenddos

    @OliverHeward I think you forgot to set the repo as public:
    https://github.com/OliverHeward/tanstack-bun-minimal

    Image

    Or it may a github bug. I've just created a new repo and I'm 90% that public was selected on the creation form but it was private after submit, had to manually make it public in settings

  2. schiller-manuel commented on Jan 8, 2026

    @schiller-manuel
    Collaborator

    please try again with nitro-nightly

    "nitro": "npm:nitro-nightly@latest"
  3. schiller-manuel commented on Jan 30, 2026

    @schiller-manuel
    Collaborator

    closing since reproducer was not accessible. please create a new issue including a complete minimal reproducer if the need arises

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions