Skip to content

Commit 466e085

Browse files
Remove redundant package copying from build-vercel.sh
- Remove better-sqlite3 and @libsql/client from copy loop - These are now direct dependencies installed by pnpm automatically - Prevents infinite recursion error during Vercel build - Keep only @ai-sdk copying logic for workspace dependencies Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/d15f5cb9-a33c-458c-aca4-417104e23d66 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent df3efb4 commit 466e085

1 file changed

Lines changed: 7 additions & 19 deletions

File tree

apps/studio/scripts/build-vercel.sh

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,16 @@ cd apps/studio
2828
# 2. Bundle API serverless function
2929
node scripts/bundle-api.mjs
3030

31-
# 3. Copy native/external modules into local node_modules for Vercel packaging.
31+
# 3. Copy @ai-sdk packages into local node_modules for Vercel packaging.
3232
#
33-
# Unlike hotcrm (which uses shamefully-hoist=true), this monorepo uses pnpm's
34-
# default strict node_modules structure. Transitive native dependencies like
35-
# better-sqlite3 only exist in the monorepo root's node_modules/.pnpm/ virtual
36-
# store — they're NOT symlinked into apps/studio/node_modules/.
33+
# The @ai-sdk packages are workspace dependencies that need to be copied from
34+
# the monorepo root. @libsql/client and better-sqlite3 are now direct dependencies
35+
# in apps/studio/package.json, so pnpm installs them automatically.
3736
#
3837
# The vercel.json includeFiles pattern references node_modules/ relative to
39-
# apps/studio/, so we must copy the actual module files here for Vercel to
40-
# include them in the serverless function's deployment package.
41-
echo "[build-vercel] Copying external native modules to local node_modules..."
42-
for mod in better-sqlite3 @libsql/client; do
43-
src="../../node_modules/$mod"
44-
if [ -e "$src" ]; then
45-
dest="node_modules/$mod"
46-
mkdir -p "$(dirname "$dest")"
47-
cp -rL "$src" "$dest"
48-
echo "[build-vercel] ✓ Copied $mod"
49-
else
50-
echo "[build-vercel] ⚠ $mod not found at $src (skipped)"
51-
fi
52-
done
38+
# apps/studio/, so we must copy @ai-sdk packages here for Vercel to include
39+
# them in the serverless function's deployment package.
40+
echo "[build-vercel] Copying external modules to local node_modules..."
5341
# Copy the @ai-sdk scope (dynamically loaded provider packages)
5442
if [ -d "../../node_modules/@ai-sdk" ]; then
5543
mkdir -p "node_modules/@ai-sdk"

0 commit comments

Comments
 (0)