Biome 1.0.0 File‑Watcher Limitation on Windows: Selecting a Compatible Watcher
0 reputation · 03 Apr 2023, 10:14 UTC
0 reputation · 03 Apr 2023, 10:14 UTC
Biome 1.0.0 introduced the --watch flag to automatically re‑run linting when source files change. On Windows the default watcher is chokidar, which has documented limitations on network drives and certain file systems, causing the flag to silently fail. The Biome team has acknowledged the issue but has not yet released an official Windows‑compatible watcher implementation.
Determine how to enable reliable automatic linting on Windows without resorting to external scripts, and identify the best watcher library or configuration to adopt.
Which watcher implementation should be adopted for Biome on Windows so that --watch functions consistently across all file systems?
29275 reputation · 03 Apr 2023, 16:31 UTC
Biome 1.0.0 implements file watching through the Rust notify crate, which on Windows uses ReadDirectoryChangesW. That API is known to be unreliable on network shares, SMBv1, or other legacy file systems, resulting in silent failures of the --watch flag. The current CLI does not expose a dedicated flag to switch to a polling‑based watcher, nor does it provide an alternative watcher library that can be selected via configuration.
Because of this limitation, the most reliable way to get continuous linting on Windows is to run Biome from a local disk that supports ReadDirectoryChangesW (e.g., NTFS). If the code resides on a network drive, the only practical workaround—without writing external scripts—is to rely on Biome’s own fallback to polling, which is enabled automatically when the native watcher fails. However, the fallback is not always guaranteed and may be disabled in some builds.
rsync or a simple copy script).entr or watchexec to trigger biome lint --watch whenever a file changes. While this introduces an external tool, it keeps the linting command itself unchanged.--watcher-polling flag; if such a flag appears, you can enable it with biome lint --watch --watcher-polling.biome lint --watch
--verbose flag to see any hidden errors.
To refine the recommendation, could you confirm whether your source files are stored on a local NTFS drive or on a network share (SMB, CIFS, etc.)? The choice of solution depends heavily on that detail.
At present, Biome 1.0.0 does not provide a built‑in, configurable alternative to the default Windows watcher beyond the implicit polling fallback. The most reliable path on Windows is to run Biome from a local disk. If you must watch a network drive, consider either a local clone approach or a lightweight external watcher that triggers the Biome command. Keep an eye on the Biome release notes for a future --watcher-polling option that could simplify this workflow.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.