From 34b4d29db5bbdd9130f4b82ec319b11db3c2d6bc Mon Sep 17 00:00:00 2001 From: Priyanshu Choudhary <57816400+Priyanchew@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:26:50 +0530 Subject: [PATCH] fix: project builds on Windows Replace Unix cp -r with Node.js fs.cpSync in CLI build script. Add webpack snapshot config to prevent Next.js scanning Windows junction points. Co-Authored-By: Claude Sonnet 4.6 --- packages/cli/package.json | 2 +- packages/web/next.config.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index b0609d3c7..7f048fbed 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -25,7 +25,7 @@ "node": ">=20.0.0" }, "scripts": { - "build": "tsc && cp -r src/assets dist/", + "build": "tsc && node -e \"require('fs').cpSync('src/assets','dist/assets',{recursive:true})\"", "dev": "tsx src/index.ts", "test": "vitest run", "test:watch": "vitest", diff --git a/packages/web/next.config.js b/packages/web/next.config.js index 64baaa9ed..85aaa6d42 100644 --- a/packages/web/next.config.js +++ b/packages/web/next.config.js @@ -11,6 +11,15 @@ const nextConfig = { "@composio/ao-plugin-tracker-linear", "@composio/ao-plugin-workspace-worktree", ], + webpack: (config) => { + if (process.platform === "win32") { + config.snapshot = { + ...config.snapshot, + managedPaths: [/^(.+?[\\/]node_modules[\\/])/], + }; + } + return config; + }, async headers() { return [ {