You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Application show starting screen after some inactivity time #1028
Hi ! When i run the application the first time it launch correctly but if i just let it for a moment and try to just reload the page it keep showing the loanding page:
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.
If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
Please use a template below to create a minimal reproduction
A public GitHub repository is also perfect. 👌
Please ensure that the reproduction is as minimal as possible. See more details in our guide.
You might also find these other articles interesting and/or helpful:
Hi there
The reproduction repository is probably private since I'm getting a 404. Also, was there anything else in the console other than the 503 log? How long was the app idle?
This is happening to me too. It happens to me when the dev server is inactive for a while, but it also happens "randomly" while I'm actively developing the project. Another thing I noticed is that HMR also doesn't seem to work correctly with certain changes (e.g., one component updates, while another doesn't update). It used to work perfectly.
Here are 2 console outputs from my dev server:
.nuxt/dist directory has been removed. Restarting Nuxt...
ℹ .nuxt/dist directory has been removed. Restarting Nuxt...
✔ Vite client built in 99ms 12:23:25 PM
✔ Vite server built in 95ms 12:23:25 PM
✔ Nuxt Nitro server built in 937ms nitro 12:23:26 PM
ℹ Vite client warmed up in 2ms 12:23:26 PM
ℹ nuxt.config.ts updated. Restarting Nuxt... 12:23:26 PM
ℹ Vite server warmed up in 10ms 12:23:26 PM
✔ Vite client built in 52ms 12:23:27 PM
✔ Vite server built in 53ms 12:23:27 PM
✔ Nuxt Nitro server built in 784ms nitro 12:23:29 PM
ℹ Vite client warmed up in 1ms 12:23:29 PM
ℹ Vite server warmed up in 8ms 12:23:29 PM
Whenever I see .nuxt/dist directory has been removed. Restarting Nuxt... or nuxt.config.ts updated. Restarting Nuxt... in the console, I know this problem has occurred and I need to restart the dev server to get it working again.
Note: These messages appear in the console even if these files or folders haven't been touched or changed.
I'm on Windows 11 with Nuxt 4, everything updated to the latest version.
Node v22.15.0
Can anyone confirm if this crashing issue is only happening to all Windows users? Because in Nuxt v4.1, in all my projects, my dev server keeps crashing and I have to manually restart it from time to time.
@dan-hale - your prior comment mentioned an issue with HMR, which doesn't sound relevant to the problem I encountered. Maybe there was a separate issue?
@josuelrocha This issue has been fixed for me after updating Nuxt CLI to 3.28.0 Perhaps you have outdated dependencies cached?
I have all packages updated to the latest version and Node.js 24. The problem persists.
--
The problem with this "fake change" is that Windows enables updating the file's "Last Access" metadata by default, while macOS disables it. Therefore, when simply opening or reading the file without modifying it, Node.js's "fs.watch" detects it as a modified file, but in reality, only the "Last Access" metadata was modified. This is causing the crash and the dev server to restart. I decided to disable the "Last accessed" update in Windows itself, since I really don't need this information at all (even because in macOS this is disabled by default), and also because it is a not so concise feature, since in Windows this information is updated with a 1 hour delay, which is why it gives the impression that the crashes occur during some period of inactivity.
So, for those who want to get rid of this problem and fix it, do the following: open the terminal in administrator mode, and first check the current value of the "Last Access" feature:
fsutil behavior query disablelastaccess
Its value is probably:
DisableLastAccess = 2 (System Managed, Last Access Time Updates ENABLED)
(Check this only for the reason if you want to revert to the old value)
So now disable it by setting the value to 1:
fsutil behavior set disablelastaccess 1
Check the current value now:
fsutil behavior query disablelastaccess
and the output will be:
DisableLastAccess = 1 (User Managed, Last Access Time Updates DISABLED)
That's it. No more crashes and fake changes in Nuxt on Windows.
The Windows-specific code in libuv that drives fs.watchregisters for changes on access time to drive a change event. The documentation for fs.watch and fs.watchFile are a bit vague on the matter, but at least for watchFile it indicates:
To be notified when the file was modified, not just accessed, it is necessary to compare curr.mtimeMs and prev.mtimeMs.
The code in @nuxt/clithat listens for changes does not check mtime before acting on the change event. I think that type of check needs to be added, or to move back to chokidar which appears to have handled this sort of concern in the prior implementation (at least based on empirical evidence).
The decision to emit change events on file access seems like an odd one on the part of libuv, and does not appear to be consistent across platforms, but that is the reality on Windows, so I think @nuxt/cli has to deal with it.
Activity
github-actions commentedon Aug 2, 2025
Would you be able to provide a reproduction? 🙏
More info
Why do I need to provide a reproduction?
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.
If
needs reproductionlabeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.How can I create a reproduction?
Please use a template below to create a minimal reproduction
A public GitHub repository is also perfect. 👌
Please ensure that the reproduction is as minimal as possible. See more details in our guide.
You might also find these other articles interesting and/or helpful:
cernymatej commentedon Aug 2, 2025
Hi there
The reproduction repository is probably private since I'm getting a 404. Also, was there anything else in the console other than the 503 log? How long was the app idle?
jeydi243 commentedon Aug 2, 2025
Hi @cernymatej , it’s now public. In console the same message of 503. 10 to 15 minutes idle
josuelrocha commentedon Aug 3, 2025
This is happening to me too. It happens to me when the dev server is inactive for a while, but it also happens "randomly" while I'm actively developing the project. Another thing I noticed is that HMR also doesn't seem to work correctly with certain changes (e.g., one component updates, while another doesn't update). It used to work perfectly.
Here are 2 console outputs from my dev server:
Whenever I see
.nuxt/dist directory has been removed. Restarting Nuxt...ornuxt.config.ts updated. Restarting Nuxt...in the console, I know this problem has occurred and I need to restart the dev server to get it working again.Note: These messages appear in the console even if these files or folders haven't been touched or changed.
I'm on Windows 11 with Nuxt 4, everything updated to the latest version.
Node v22.15.0
dan-hale commentedon Aug 3, 2025
@josuelrocha HMR on pages is broken for me, but works fine on components.
Also seeing the crashes after 10-15 minuets.
Possibly a duplicate of nuxt/nuxt#32564?
josuelrocha commentedon Aug 4, 2025
@dan-hale about HMR, it may be related
josuelrocha commentedon Sep 3, 2025
Can anyone confirm if this crashing issue is only happening to all Windows users? Because in Nuxt v4.1, in all my projects, my dev server keeps crashing and I have to manually restart it from time to time.
aroneous commentedon Sep 6, 2025
Note that in #1030 , I identified the cause of this as #913, and found that rolling back
@nuxt/clito 3.25.1 resolved the issue for me.kiansa commentedon Sep 11, 2025
Please fix this issue it's very annoying.
I've tried rolling back @nuxt/cli to 3.25.1 but the issue is still there.
[vite] server connection lost. Polling for restart...josuelrocha commentedon Sep 17, 2025
@danielroe could you please give this some urgent attention? developing on Windows with Nuxt has been a bit troublesome due to the crashes.
dan-hale commentedon Sep 17, 2025
@josuelrocha This issue has been fixed for me after updating Nuxt CLI to 3.28.0 Perhaps you have outdated dependencies cached?
aroneous commentedon Sep 17, 2025
@dan-hale - your prior comment mentioned an issue with HMR, which doesn't sound relevant to the problem I encountered. Maybe there was a separate issue?
dan-hale commentedon Sep 17, 2025
@aroneous I also experienced this bug. Both were fixed for me at the same time when updating nuxt and the cli on my project.
aroneous commentedon Sep 17, 2025
@dan-hale - I'm still seeing the issue on 3.28.0
josuelrocha commentedon Sep 18, 2025
I have all packages updated to the latest version and Node.js 24. The problem persists.
--
The problem with this "fake change" is that Windows enables updating the file's "Last Access" metadata by default, while macOS disables it. Therefore, when simply opening or reading the file without modifying it, Node.js's "fs.watch" detects it as a modified file, but in reality, only the "Last Access" metadata was modified. This is causing the crash and the dev server to restart. I decided to disable the "Last accessed" update in Windows itself, since I really don't need this information at all (even because in macOS this is disabled by default), and also because it is a not so concise feature, since in Windows this information is updated with a 1 hour delay, which is why it gives the impression that the crashes occur during some period of inactivity.
So, for those who want to get rid of this problem and fix it, do the following: open the terminal in administrator mode, and first check the current value of the "Last Access" feature:
Its value is probably:
(Check this only for the reason if you want to revert to the old value)
So now disable it by setting the value to 1:
Check the current value now:
and the output will be:
That's it. No more crashes and fake changes in Nuxt on Windows.
aroneous commentedon Sep 18, 2025
The Windows-specific code in libuv that drives
fs.watchregisters for changes on access time to drive achangeevent. The documentation forfs.watchandfs.watchFileare a bit vague on the matter, but at least forwatchFileit indicates:The code in
@nuxt/clithat listens for changes does not check mtime before acting on thechangeevent. I think that type of check needs to be added, or to move back tochokidarwhich appears to have handled this sort of concern in the prior implementation (at least based on empirical evidence).The decision to emit
changeevents on file access seems like an odd one on the part oflibuv, and does not appear to be consistent across platforms, but that is the reality on Windows, so I think@nuxt/clihas to deal with it.danielroe commentedon Sep 18, 2025
thank you for that context @aroneous 🙏
let's aim to handle that within nuxt/cli ....