From f32bf92c3a934288b03d277d4520ae55248a3316 Mon Sep 17 00:00:00 2001 From: micronox <48791327+micronox@users.noreply.github.com> Date: Sat, 27 Jun 2026 10:22:31 -0500 Subject: [PATCH] fix(windows): resolve process spawning and path resolution blockers for windows host Replaced Unix-specific 'pnpm' reference with 'pnpm.cmd', injected shell: true to fix spawn EINVAL, and corrected UI copy syntax to resolve build crashes. --- packages/code-agents-ui/package.json | 2 +- scripts/dev-lazy.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/code-agents-ui/package.json b/packages/code-agents-ui/package.json index 3fe2ec0b69..b767a39bea 100644 --- a/packages/code-agents-ui/package.json +++ b/packages/code-agents-ui/package.json @@ -42,7 +42,7 @@ "provenance": true }, "scripts": { - "build": "tsgo && cp src/styles.css dist/styles.css", + "build": "tsgo && copy src\\styles.css dist\\styles.css", "prepublishOnly": "npm run build", "typecheck": "tsgo --noEmit" }, diff --git a/scripts/dev-lazy.ts b/scripts/dev-lazy.ts index 9e8e1ae2dc..b09b24edd0 100644 --- a/scripts/dev-lazy.ts +++ b/scripts/dev-lazy.ts @@ -855,8 +855,8 @@ function startApp(app: TemplateApp): void { app.outputTail = undefined; const basePath = `/${app.id}`; - const child = spawn( - "pnpm", + const child = spawn( + "pnpm.cmd", [ "--dir", app.dir, @@ -869,6 +869,7 @@ function startApp(app: TemplateApp): void { "--strictPort", ], { + shell: true, cwd: ROOT, stdio: ["ignore", "pipe", "pipe"], detached: process.platform !== "win32", @@ -1406,7 +1407,7 @@ if (usePollingFileWatcher) { ); } -startBackgroundProcess("core", "pnpm", [ +startBackgroundProcess("core", "pnpm.cmd", [ "--filter", "@agent-native/core", "exec", @@ -1464,7 +1465,7 @@ function listen(port: number, attempts = 20): void { // Google sign-in opens the Clips backend URL directly in the browser. const startClipsTray = () => { if (shuttingDown) return; - startBackgroundProcess("tray", "pnpm", [ + startBackgroundProcess("tray", "pnpm.cmd", [ "--filter", "clips-desktop", "dev", @@ -1497,13 +1498,13 @@ function listen(port: number, attempts = 20): void { const env = electronLazyEnv(); startBackgroundProcess( "frame", - "pnpm", + "pnpm.cmd", ["--filter", "@agent-native/frame", "dev"], env, ); startBackgroundProcess( "electron", - "pnpm", + "pnpm.cmd", ["--filter", "@agent-native/desktop-app", "dev"], env, );