Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): clean stale lockfile when manifest changed even if node_modules is absent

[._.]/ Adam Eivyd07af8e276eb
diff --git a/scripts/ensure-deps.js b/scripts/ensure-deps.js
index 1753a1b598..cdc046c39c 100644
--- a/scripts/ensure-deps.js
+++ b/scripts/ensure-deps.js
@@ -166,7 +166,10 @@ for (const { dir, label } of WORKSPACES) {
: !nodeModulesMissing && manifestNewerThanInstall(dir);
if (nodeModulesMissing || depsChanged) {
- if (depsChanged && !nodeModulesMissing) {
+ if (depsChanged) {
+ // Clean whenever the manifest changed — even if node_modules is already
+ // gone — so the stale gitignored lockfile is removed and npm resolves the
+ // tree from scratch instead of reusing the old per-install lock.
console.log(`🧹 ${label} package.json changed since last install — clean reinstall...`);
cleanWorkspaceDeps(dir);
} else {