From 13a72d59895f7c6aa93e841a51599f1032201883 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 00:39:30 +0000 Subject: [PATCH 01/10] fix: configure Vercel output directory - Add vercel.json to specify correct build command and output directory - Set outputDirectory to "public/web" where static files are generated - This fixes the "No Output Directory named web found" error on Vercel --- vercel.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..87ebb3c0 --- /dev/null +++ b/vercel.json @@ -0,0 +1,6 @@ +{ + "buildCommand": "pnpm run build:web", + "outputDirectory": "public/web", + "installCommand": "pnpm install", + "framework": null +} From f9d666d93f0f9f4ee9b8f57e071bf8109d2f4b0f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 00:45:44 +0000 Subject: [PATCH 02/10] fix: update Vercel build command to direct path - Change buildCommand from script reference to direct command - Use 'cd packages/web/buildingai-ui && pnpm run generate' instead of 'pnpm run build:web' - Add --frozen-lockfile to installCommand for better reliability - This fixes the "Missing script: build:web" error in Vercel --- vercel.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vercel.json b/vercel.json index 87ebb3c0..0a7534a0 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { - "buildCommand": "pnpm run build:web", + "buildCommand": "cd packages/web/buildingai-ui && pnpm run generate", "outputDirectory": "public/web", - "installCommand": "pnpm install", + "installCommand": "pnpm install --frozen-lockfile", "framework": null } From 286695f187c5712e6cdfaf8f3f06ad9ddc526d53 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 00:57:43 +0000 Subject: [PATCH 03/10] fix: use Nuxt direct output for Vercel build - Run nuxt generate directly without release.mjs script - Change outputDirectory to packages/web/buildingai-ui/.output/public - Remove .env file dependency (use Vercel environment variables) - Set NUXT_BUILD_SSR=false and NUXT_BUILD_ENV=production inline - This fixes build exit code 1 error by avoiding release script in Vercel --- vercel.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vercel.json b/vercel.json index 0a7534a0..9b6b01af 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { - "buildCommand": "cd packages/web/buildingai-ui && pnpm run generate", - "outputDirectory": "public/web", + "buildCommand": "cd packages/web/buildingai-ui && cross-env NODE_OPTIONS=--max-old-space-size=8192 NUXT_BUILD_SSR=false NUXT_BUILD_ENV=production nuxt generate", + "outputDirectory": "packages/web/buildingai-ui/.output/public", "installCommand": "pnpm install --frozen-lockfile", "framework": null } From 64b09d8f9c6d67a02dc6339ad6f6cbf039ec6544 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 01:07:11 +0000 Subject: [PATCH 04/10] fix: use pnpm workspace filter for Vercel build - Use 'pnpm --filter @buildingai/buildingai-ui run generate' - This properly runs the generate script in the monorepo context - Output directory set to 'public/web' where release.mjs copies files - Simplified installCommand back to 'pnpm install' - This approach works with pnpm workspaces and Vercel's build environment --- vercel.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vercel.json b/vercel.json index 9b6b01af..c5785029 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { - "buildCommand": "cd packages/web/buildingai-ui && cross-env NODE_OPTIONS=--max-old-space-size=8192 NUXT_BUILD_SSR=false NUXT_BUILD_ENV=production nuxt generate", - "outputDirectory": "packages/web/buildingai-ui/.output/public", - "installCommand": "pnpm install --frozen-lockfile", + "buildCommand": "pnpm --filter @buildingai/buildingai-ui run generate", + "outputDirectory": "public/web", + "installCommand": "pnpm install", "framework": null } From d311aac2953c40f45ccb45559e9199e3a0519a15 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 01:22:00 +0000 Subject: [PATCH 05/10] fix: build workspace dependencies before Nuxt generate - Add build step for all dependencies of buildingai-ui package - Use pnpm filter with ^... to build all workspace dependencies first - Command: pnpm --filter @buildingai/buildingai-ui^... build - Then run generate to build the Nuxt app - This fixes TypeScript errors about missing @buildingai/types, @buildingai/constants, etc. --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index c5785029..7021e0b8 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "pnpm --filter @buildingai/buildingai-ui run generate", + "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && pnpm --filter @buildingai/buildingai-ui run generate", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null From c8a69634629fcb828e1f16c6e71e89003274a8af Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 01:26:02 +0000 Subject: [PATCH 06/10] fix: create Vercel-specific build script without .env dependency - Add build:vercel script that runs nuxt generate without --dotenv flag - Use pnpm exec for cross-env to ensure it's available in PATH - Update vercel.json to use new build:vercel script - This fixes the issue where .env file is required but not available on Vercel - Ensures public/web directory is created by release.mjs script --- package.json | 1 + vercel.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 648f4f31..30ec8edb 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "scripts": { "build": "cross-env NODE_OPTIONS=--max-old-space-size=5120 turbo run build", "build:web": "cd packages/web/buildingai-ui && pnpm run generate", + "build:vercel": "cd packages/web/buildingai-ui && pnpm exec cross-env NODE_OPTIONS=--max-old-space-size=8192 NUXT_BUILD_SSR=false NUXT_BUILD_ENV=production nuxt generate && pnpm exec cross-env NUXT_BUILD_SSR=false node ../../../scripts/release.mjs", "dev": "turbo run dev", "start": "pnpm i && cd packages/cli && pnpm run start", "predeploy": "pnpm i && cd packages/cli && pnpm run predeploy", diff --git a/vercel.json b/vercel.json index 7021e0b8..fbfd66b7 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && pnpm --filter @buildingai/buildingai-ui run generate", + "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && pnpm run build:vercel", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null From ca3602ce3d9fa625d2468a7d50d9a73a441937a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 01:35:03 +0000 Subject: [PATCH 07/10] fix: inline build command in vercel.json to avoid script resolution issues - Remove dependency on package.json build:vercel script - Inline entire build command directly in vercel.json - Ensures command runs correctly regardless of pnpm context - Build flow: dependencies build -> nuxt generate -> release script --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index fbfd66b7..dae98a41 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && pnpm run build:vercel", + "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && cd packages/web/buildingai-ui && pnpm exec cross-env NODE_OPTIONS=--max-old-space-size=8192 NUXT_BUILD_SSR=false NUXT_BUILD_ENV=production nuxt generate && pnpm exec cross-env NUXT_BUILD_SSR=false node ../../../scripts/release.mjs", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null From c10bef46370f7bc793b537ed743c475325b5abc7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 09:32:08 +0000 Subject: [PATCH 08/10] fix: use build script to avoid Vercel 256-char buildCommand limit - Create build-vercel.sh with full build logic - Vercel buildCommand has 256 character limit - Script handles: workspace deps build, nuxt generate, release - Update vercel.json to use: bash build-vercel.sh --- build-vercel.sh | 18 ++++++++++++++++++ vercel.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 build-vercel.sh diff --git a/build-vercel.sh b/build-vercel.sh new file mode 100755 index 00000000..eed7b67d --- /dev/null +++ b/build-vercel.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Building workspace dependencies..." +pnpm --filter @buildingai/buildingai-ui^... build + +echo "Generating Nuxt static site..." +cd packages/web/buildingai-ui + +NODE_OPTIONS=--max-old-space-size=8192 \ +NUXT_BUILD_SSR=false \ +NUXT_BUILD_ENV=production \ +pnpm exec nuxt generate + +echo "Running release script..." +NUXT_BUILD_SSR=false node ../../../scripts/release.mjs + +echo "Build complete!" diff --git a/vercel.json b/vercel.json index dae98a41..4eaa49ec 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "pnpm --filter @buildingai/buildingai-ui^... build && cd packages/web/buildingai-ui && pnpm exec cross-env NODE_OPTIONS=--max-old-space-size=8192 NUXT_BUILD_SSR=false NUXT_BUILD_ENV=production nuxt generate && pnpm exec cross-env NUXT_BUILD_SSR=false node ../../../scripts/release.mjs", + "buildCommand": "bash build-vercel.sh", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null From b675ebd733cedb9765330679010225ece60a3e45 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 09:40:47 +0000 Subject: [PATCH 09/10] fix: use relative path for build script execution --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 4eaa49ec..704b0731 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "bash build-vercel.sh", + "buildCommand": "./build-vercel.sh", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null From 71cc1c7ef7fbbc95ae96c64ecd6aec95ff947d5e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 5 Dec 2025 10:01:00 +0000 Subject: [PATCH 10/10] fix: use sh instead of ./ for script execution --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 704b0731..0f21f331 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "./build-vercel.sh", + "buildCommand": "sh build-vercel.sh", "outputDirectory": "public/web", "installCommand": "pnpm install", "framework": null