From a13ed5078cd5ddadeaafc131fc9db7e4278422bb Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Feb 2026 01:59:09 +0000 Subject: [PATCH] Fix path helper shadowing Node's path module in dev-electron script The helper function `f` declared a parameter named `path` which shadowed the intended use of Node's `path.join()`. Since strings don't have a `.join` method, this caused a runtime TypeError before Electron could start. Fix: import `node:path` and rename the parameter to `p`. --- apps/desktop/scripts/dev-electron.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/desktop/scripts/dev-electron.mjs b/apps/desktop/scripts/dev-electron.mjs index 9e9372fe33..46c3ce59ea 100644 --- a/apps/desktop/scripts/dev-electron.mjs +++ b/apps/desktop/scripts/dev-electron.mjs @@ -1,6 +1,7 @@ import { spawn } from "node:child_process"; import fs from "node:fs"; import net from "node:net"; +import path from "node:path"; const port = Number(process.env.ELECTRON_RENDERER_PORT ?? 5173); const STARTUP_TIMEOUT_MS = Number(process.env.T3CODE_ELECTRON_STARTUP_TIMEOUT_MS ?? 120_000); @@ -25,7 +26,7 @@ async function canConnect(host, probePort, timeoutMs = 1_000) { }); } -const f = (path) => path.join(import.meta.dirname, "..", path); +const f = (p) => path.join(import.meta.dirname, "..", p); function waitForDesktopBundles(timeoutMs) { const FRESHNESS_GRACE_MS = 10_000;