N
Nuxt3w ago
Tilko

Very slow development performance on windows. (12s for blank nuxt project)

I have performance issues on windows. Usually I'm using WSL where I don't have any problems but when I'm launching it directly on windows it's very slow. I created just a blank project and it's loading very slow. Does anyone know why this is happening? Or what I could try? node - v22.15.0 package manager: pnpm update: instead http://localhost:3000/ I opened with http://127.0.0.1:3000/ and it only takes 1.4s to load
4 Replies
kapa.ai
kapa.ai3w ago
Hi @Tilko. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Slow development performance on Windows when running Nuxt is a known issue, especially regarding Hot Module Replacement (HMR) and initial load times. This has been reported by several users, with some experiencing reload times of 12 seconds or more even for blank projects. Why does this happen? - The Nuxt team and community have observed that HMR and file watching can be significantly slower on Windows compared to Linux environments. - The underlying cause is often related to how file watchers and the development server interact with the Windows filesystem, which can be less efficient than on Linux. What can you try? 1. Use WSL (Windows Subsystem for Linux): - The most effective workaround is to use WSL with a Linux distribution like Ubuntu. Many users report that this reduces reload times to under a second and avoids multiple restarts, providing a much smoother development experience. This is the recommended approach for Windows users facing performance issues with Nuxt development servers docs: improve HMR performance note for Windows users. 2. Change the File Watcher: - Nuxt allows you to change the file watcher in your nuxt.config file. Setting the watcher to @parcel/watcher may improve performance in large projects or on Windows platforms. Example:
export default defineNuxtConfig({
experimental: {
watcher: 'parcel'
}
})

export default defineNuxtConfig({
experimental: {
watcher: 'parcel'
}
})

- See the documentation for more details: Nuxt Configuration: watcher. 3. General Recommendations: - Make sure you are using an even-numbered Node.js version (e.g., 20.x or 22.x), as recommended by Nuxt. - If you have global Nuxt or DevTools packages installed, try removing them and only use local project dependencies, as global installations can sometimes cause conflicts or unexpected behavior Not able to run new project. Summary:
Running Nuxt directly on Windows can be slow due to file watching and HMR inefficiencies. Using WSL is the most reliable solution, but you can also experiment with the watcher setting in your config. If you continue to experience issues, check for global package conflicts and ensure your Node.js version is up to date. If you need help setting up WSL or changing the watcher, let me know! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@254138818351988737> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Tilko
TilkoOP3w ago
In the browser with non localhost url is working fine, although I wanna solve also that issue. But I think built time and especially hot reload still seems slower compared to WSL (right)
Tilko
TilkoOP3w ago
and for localhost:3000 I still don't know why it's so slow. I tried to edit host file
127.0.0.1 localhost
::1 localhost
127.0.0.1 localhost
::1 localhost
I tried to disable ipv6 or something no use... still a blank for me. But I need this to work on windows because I wanna use tauri with nuxt found related issue... will look more into it tomorrow https://github.com/nuxt/cli/issues/136 https://www.reddit.com/r/Nuxt/s/qch7d7BRFT another thing I noticed is it's only slow on chromium browsers so this bug is only happening on - windows (wsl is fine) - chromium browser

Did you find this page helpful?