extremly long compiling time during development
Hey I have just created a nuxtjs project with pnpm and made no changement but when I run the development environment i get very long compiling times (like 40s for 1 file) and it makes it impossible to dev correctly. How could I fix it?

2 Replies
Hi @leoprosy. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
If you're experiencing extremely long compile times (e.g., 40 seconds for a single file) during Nuxt development, especially on Windows, this is a known issue for some users. The Nuxt team has documented that Hot Module Replacement (HMR) performance on Windows can be very slow, with reload times sometimes exceeding a minute for larger projects.
Recommended Solution:
- Use WSL (Windows Subsystem for Linux) with a distribution like Ubuntu. This setup can reduce reload times to under a second and avoid multiple restarts, providing a much smoother development experience. This recommendation is now included in the official Nuxt documentation for Windows users, based on community reports and testing docs: improve HMR performance note for Windows users.
If you are not on Windows or are already using WSL and still experiencing issues, the knowledge sources do not provide further troubleshooting steps. However, keeping your dependencies up to date and ensuring your environment matches Nuxt's recommendations may help.
Let me know if you need more specific guidance for your setup!
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@619940636086501396> Kapa.ai is still learning and improving, please let me know how I did by reacting below.