Skip to content

Move to native fs.watch results in unpredictable restarts #1030

@aroneous

Description

@aroneous

#913 has resulted in my dev server, running on Windows 11, restarting every ~5 minutes due to 'fake' change notifications on nuxt.config.ts and .nuxt/dist/server, making dev mode essentially unusable.

Experimentation shows that actions not involving a change to file content or modification time can result in a 'change' event from fs.watch, triggering the reload. E.g., just opening file properties in Windows Explorer can cause a 'change' event. This is sufficient to trigger a dev server restart.

I'm not sure what is poking at these files every ~5 minutes, but I've verified that no actual changes have occurred when the 'change' events are emitted, so this new strategy seems unfeasible on Windows. Explicitly rolling back to @nuxt/cli < 3.26.0 (3.25.1, specifically) has resolved the issue for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions