Describe the bug
The auto-update-checker feature is broken on Windows. It silently fails when trying to remove the active installation directory before reinstalling via npm.
Root Cause
In packages/plugin/src/hooks/auto-update-checker/cache.ts, the removeInstalledPackage function attempts to delete the active plugin directory using rmSync(packageDir, { recursive: true, force: true }).
Because the plugin's code and its native SQLite bindings (.node files) are actively loaded in memory by the process executing the update, Windows strictly locks them. rmSync throws an EBUSY or EPERM error, which is caught by an outer try/catch in preparePackageUpdate(). This causes the updater to log a warning and silently abort.
Expected behavior
The updater should successfully apply updates on Windows. This may require employing an out-of-process updater script or utilizing a workaround like renaming the locked directory (e.g., to .old) before downloading the new package, as Windows sometimes permits renaming open files.
Describe the bug
The
auto-update-checkerfeature is broken on Windows. It silently fails when trying to remove the active installation directory before reinstalling via npm.Root Cause
In
packages/plugin/src/hooks/auto-update-checker/cache.ts, theremoveInstalledPackagefunction attempts to delete the active plugin directory usingrmSync(packageDir, { recursive: true, force: true }).Because the plugin's code and its native SQLite bindings (
.nodefiles) are actively loaded in memory by the process executing the update, Windows strictly locks them.rmSyncthrows anEBUSYorEPERMerror, which is caught by an outertry/catchinpreparePackageUpdate(). This causes the updater to log a warning and silently abort.Expected behavior
The updater should successfully apply updates on Windows. This may require employing an out-of-process updater script or utilizing a workaround like renaming the locked directory (e.g., to
.old) before downloading the new package, as Windows sometimes permits renaming open files.