nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
1.86k stars 75 forks source link

vinxi dev unable to start dev server #287

Closed birkskyum closed 2 months ago

birkskyum commented 5 months ago

I'm not sure what causes this, but I can wait minutes on the vinxi dev to start up, and sometimes it never succeeds. I have to restart the process after a few minutes until it eventually completes

nksaraf commented 5 months ago

Is there a reproduction for this ?

birkskyum commented 5 months ago

I can't reproduce it consistently. Most times it's up fast enough, but sometimes it just hangs. I'll make a ticket if I can reliably repro.

birkskyum commented 5 months ago

just to give an idea of what i experience, it's this infinite load that eventually stops (can be stuck for >10min), and then suddenly after one of many restarts load the page immediately

https://github.com/nksaraf/vinxi/assets/74932975/cee0f873-0c56-4d09-9446-31024cf680aa

birkskyum commented 5 months ago

it got stuck when I changed in this file, and didn't manage to reflect the change. Those tsxs filenames looks suspicious.

Screenshot 2024-04-29 at 22 24 20
birkskyum commented 4 months ago

seems like some infinite loop with this:

birkskyum commented 4 months ago
Screenshot 2024-05-17 at 15 06 28
birkskyum commented 4 months ago

This appear to be limited to ssr: true

birkskyum commented 4 months ago

And when hitting a routes/page/[id]/ page after a server restart

nksaraf commented 4 months ago

wow thats incredibly specific and rare.. why lord whyyy!

birkskyum commented 4 months ago

I'm getting closer. It's related to reactivity that is outside of the root node, so it's not cleaned up properly. I can see how it might disturb HRM, but I just don't understand why it's a problem if I fully restart the server.

birkskyum commented 4 months ago

So at this point, I'm just disabling ssr when developing, and enabling it when deploying.

birkskyum commented 3 months ago

@doeixd , do you see this too? are you able to repro?

doeixd commented 3 months ago

Unfortunately not. I just tried to reproduce following what your suggested: ssr: true and hitting /routes/page/[id]/ after a server restart, but it seemed to work as expected.

birkskyum commented 3 months ago

Have less issues with this after switching to bun...

birkskyum commented 2 months ago

Don't know if fixed by vinxi 0.4.1 - will close for now.