Turbopack Error: "Failed to sync database directory after updating CURRENT" on WSL2 when the directory is on a mounted Windows drive #97814
wazuka-rail
started this conversation in
Turbopack Error Report
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Next.js version:
16.3.2Error message:
When running
next dev(ornext build) with Turbopack's persistent FileSystem Cache enabled from inside WSL2, and the project directory lives on a mounted Windows drive (e.g. /mnt/c/Users/..., backed by drvfs/9p or virtiofs), the cache commit fails with the error above.This is the same class of failure that Turbopack already special-cases for native Windows
next.js/turbopack/crates/turbo-persistence/src/db.rs
Lines 244 to 251 in c0dfeff
because opening a directory handle and calling
sync_data()on it is not meaningful/supported on Windows filesystem semantics. WSL2's drvfs mount for Windows drives inherits the same limitation (unlike native ext4 inside the WSL2 VM), so the existingcfg(not(windows))guard does not cover this case even though the underlying cause is identical.Suggested Fix
Detect at runtime whether directory fsync is supported (e.g., attempt it once, and if it fails with EINVAL/EACCES/ENOTSUP, treat the filesystem as not supporting it and suppress the error message as non-fatal failure).
All reactions