router icon indicating copy to clipboard operation
router copied to clipboard

[Start]: $RefreshSig$ is not a function

Open omarkhatibco opened this issue 1 year ago • 3 comments

Describe the bug

This might not be a bug related to the start directly, but somehow it works fine in vite directly.

the problem that some file is not compliant with fast refresh and therefore it invalidates

it breaks in the start starter but works fine in vite.

check the repository for a reproduction

Your Example Website or App

https://github.com/omarkhatibco/start-test

Steps to Reproduce the Bug or Issue

run bun install and then bun dev check both urls http://localhost:3000/ & http://localhost:5174/ you can see that start url is failing.

Expected behavior

it should work fine

Screenshots or Videos

No response

Platform

  • OS: macos
  • Browser: Chrome
  • Version: lastest

Additional context

No response

omarkhatibco avatar Aug 23 '24 16:08 omarkhatibco

Trying this out, I'm not getting any errors thrown in either "app" in the client or the server.

Following the reproduction steps, I ran the bun dev command and had both URLs opened. In each project, I made a change and observed the following.

  • In the vite project, on the client, an HMR update was performed with the updated content.
  • In the Start project, a page reload occurred with the updated content.

@tannerlinsley is this expected behaviour (given that this is SSR)?

SeanCassiere avatar Aug 29 '24 22:08 SeanCassiere

Speaking with Tanner, the HMR not replacing the modules and instead performing a full reload is indeed a bug.

SeanCassiere avatar Aug 29 '24 23:08 SeanCassiere

@SeanCassiere btw, I discovered that if you update something inside the monorepo library, the dev server will crash

omarkhatibco avatar Aug 30 '24 23:08 omarkhatibco

Just had the same error. Two Start projects on a monorepo, same start, router and react versions. One of them crashes when using the useQuery hook with a useServerFn, the other works just fine. How can I help?

guidovizoso avatar Jan 10 '25 23:01 guidovizoso

any updates on this ?

getting same issue when trying to use useMatches for a crumb based component in my app

Flowko avatar Jan 26 '25 11:01 Flowko

The HMR fixes for Start have been merged in and most (if not all) of the HMR bugs should be resolved with the https://github.com/TanStack/router/releases/tag/v1.99.3.

If more, HMR bugs popup, please open a new Issue on github so that it can be tracked separately.

SeanCassiere avatar Feb 03 '25 04:02 SeanCassiere