Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Project takes awhile to load on Windows, possibly breaking hot reload #358

Open
ajyong opened this issue Jul 5, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ajyong
Copy link
Member

ajyong commented Jul 5, 2024

tldr: I'm looking for Windows developers to chime in (possibly fix?) this problem. Both when running in WSL2 or bare metal, starting up this project takes a long time (1+ minute) with lots of hanging in between. Hot reload suffers due to latency.

Collecting these as I find them. Note: I don't use Windows as my daily dev machine, these issues were encountered by other folks while I was pair programming with them.

General Windows slowness

These are the speeds on my Mac M1 Max:

aaron@SAIKYO-Aaron-MBP:~/code/DES-Website [main ≡]$ npm run dev

> dev
> nuxt dev

Nuxt 3.11.1 with Nitro 2.9.4                                                                             2:48:39 p.m.
                                                                                                         2:48:39 p.m.
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

ℹ Using default Tailwind CSS file                                                      nuxt:tailwindcss 2:48:41 p.m.
  ➜ DevTools: press Shift + Option + D in the browser (v1.1.3)                                           2:48:41 p.m.

ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                                    nuxt:tailwindcss 2:48:42 p.m.
ℹ Vite client warmed up in 2803ms                                                                       2:48:45 p.m.
✔ Nuxt Nitro server built in 1955 ms                                                              nitro 2:48:46 p.m.
ℹ Vite server warmed up in 3187ms                                                                       2:48:46 p.m.

On Windows, every single timestamp takes 5-10x to happen, if not longer. To get to the point where localhost:3000 shows a website, it can take 2 minutes or even restarting the npm run dev command. Doesn't seem to matter if it's under WSL2 or bare metal.

WSL no hot reload

In WSL2, hot reload doesn't pick up file changes, although that's probably something we can fix with adding polling: true to the config file.

Related Issues

Seems like Windows dev experience can be flaky, and interactions between Nuxt and other packages seems to be the culprit.

@ajyong ajyong added the bug Something isn't working label Jul 5, 2024
@ajyong ajyong changed the title bug: Project has 2 Windows-specific build issues bug: Project takes awhile to load on Windows, possibly breaking hot reload Jul 5, 2024
@ajyong ajyong added the help wanted Extra attention is needed label Jul 6, 2024
@arashsheyda
Copy link
Collaborator

I don't use windows either, but maybe disabling devtools would help to speed up

devtools: {
enabled: true,
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants