Something went wrong. Try again.
I'm going to build my own OpenClaw, with blackjack... and bun!
Something went wrong. Try again.
694 B · 24 lines
TypeScript
at main
12345678910111213141516171819202122232425import { existsSync, symlinkSync } from "fs";import { join } from "path";
import { createLogger, debugSuppressedError } from "../utils/logger.js";
const log = createLogger("agent-pool.session");
export function ensureExtensionNodeModulesLink(extensionsDir: string, nodeModulesDir: string | null): void { if (!nodeModulesDir) return;
const link = join(extensionsDir, "node_modules"); if (existsSync(link)) return;
try { symlinkSync(nodeModulesDir, link); } catch (error) { if (existsSync(link)) return; debugSuppressedError(log, "Failed to create bundled extension node_modules symlink.", error, { extensionsDir, link, nodeModulesDir, }); }}