Error AtlasError Documentation and Resolution

Vite does not detect file changes under WSL2

Vite does not detect a file change.

Vite file watching can fail under WSL2 in certain filesystem conditions, preventing the dev server from noticing edits.

Vite does not detect a file changedevelopment servers
Vite does not detect a file change.
  • The project is running under WSL2 in a file-watching scenario that does not propagate changes reliably.
  • Filesystem boundaries or mount behavior interfere with watcher events.
  • The default watch strategy is not suitable for the current WSL2 setup.
  1. Review Vite's `server.watch` settings for the WSL2 environment.
  2. Use a filesystem location that supports reliable file watch events.
  3. Adjust the watcher strategy if your development setup requires polling or different watch behavior.
Vite: Troubleshooting
Vite does not detect file change in WSL2: causes and fixes | Error Atlas