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

fix: identify dependency owners for dangling links (#12248)

Adam Eivy12e2009433e7
diff --git a/scripts/lib/workspaceDependencies.js b/scripts/lib/workspaceDependencies.js
index 101ff64ca7..16d4393263 100644
--- a/scripts/lib/workspaceDependencies.js
+++ b/scripts/lib/workspaceDependencies.js
@@ -1,6 +1,6 @@
/** Read-only workspace/dependency ownership shared by startup and pregate. */
-import { lstatSync, readFileSync, realpathSync } from 'fs';
-import { join } from 'path';
+import { lstatSync, readFileSync, realpathSync, readlinkSync } from 'fs';
+import { join, resolve } from 'path';
export function dependencyWorkspaces(root) {
return ['root', 'client', 'server', 'autofixer'].map(label => ({
@@ -31,6 +31,7 @@ export function inspectWorkspaceDependencies({ dir, label }) {
let owner = dir;
try {
linked = hasLinkedDependencies(dir);
+ if (linked) owner = join(resolve(dir, readlinkSync(join(dir, 'node_modules'))), '..');
owner = join(realpathSync(join(dir, 'node_modules')), '..');
} catch (error) {
issues.push(`node_modules ${error.code === 'ENOENT' ? 'missing' : 'unreadable'} (${error.code})${linked ? ' — linked target unavailable' : ''}`);