nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.09k stars 4.94k forks source link

`nuxt dev` startup on any project has degraded to >2 minutes on NixOS #28023

Open wale opened 2 months ago

wale commented 2 months ago

Environment


Reproduction

Instructions and relevant repositories included in: https://github.com/wale/nuxt-nix-repro

Describe the bug

Nuxt 3 projects regardless of size or scope take ~2-3 minutes to start, regardless of whether the development server has been instantiated for the first time.

Vite client/server builds take up to 10 seconds, whereas the Nitro server takes nearly 3 minutes on a project that has not been modified from the Nuxt starter template, outside of Nix setup and addition of NODE_OPTIONS.

image

Additional context

Workarounds found in similar issues (https://github.com/nuxt/nuxt/issues/27106, https://github.com/nuxt/nuxt/issues/26211), which involve downgrading Nuxt dependencies to earlier versions, seem to not work at all and only seem to provide similar startup times.

Logs

No response

Ovyerus commented 2 months ago

Reproducible here on my NixOS desktop as well, specifically Nixpkgs Unstable, rev 00d80d13810dbfea8ab4ed1009b09100cca86ba8. Ryzen 5 5600X

terminal sceenshot

wvffle commented 1 month ago

Same issue on my Steam Deck with NixOS

image

danielroe commented 1 month ago

Would you try with Nuxt v3.12.4? 🙏

wvffle commented 1 month ago

Sure, note that I did a reboot in the meantime, so more memory is freed.

image

wvffle commented 1 month ago

I'm uploading the log with debug: true in nuxt configuration if that would help.

debug.log

Also I've noticed, that the memory used by node process spawned by pnpm dev was slowly rising up to 5GB. At that point I had to do some other things, so I just left the process running and stopped observing.

I'm using node v22.3.0, but I've also had same issues with v18 and v20 in my projects.