From b0d07fcaf29c62188d13b4c1301f2c024d4e591f Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Thu, 15 Oct 2026 01:43:26 +0400 Subject: [PATCH] Run the Vercel CLI under Node in the deploy job Under Bun, with no node_modules when the CLI started, the Next.js builder resolved next through Bun's auto-install cache (16.4.1) instead of the locked 16.4.0, and the build output referenced files in that cache, which Vercel could not read. Co-Authored-By: Claude Opus 5.5 --- .github/deploy-production.sh | 6 +++++- .github/workflows/push.yaml | 4 ++++ changelog.d/deploy-cli-under-node.fixed.md | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 changelog.d/deploy-cli-under-node.fixed.md diff --git a/.github/deploy-production.sh b/.github/deploy-production.sh index 6633d62..abb9e62 100644 --- a/.github/deploy-production.sh +++ b/.github/deploy-production.sh @@ -6,7 +6,11 @@ set -euo pipefail # route. VERCEL_ORG_ID and VERCEL_PROJECT_ID select the project. : "${VERCEL_TOKEN:?Set VERCEL_TOKEN in the Production environment.}" : "${VERCEL_ORG_ID:?}" "${VERCEL_PROJECT_ID:?}" -vercel=(bunx --bun "vercel@58.8.0") +# Run the CLI under Node, not Bun. Under Bun, with no node_modules yet, the +# Next.js builder resolved `next` through Bun's auto-install cache instead of +# the project's locked copy, and Vercel could not read the cached files the +# build output then referenced. +vercel=(npx --yes "vercel@58.8.0") "${vercel[@]}" pull --yes --environment=production --token "$VERCEL_TOKEN" "${vercel[@]}" build --prod --token "$VERCEL_TOKEN" "${vercel[@]}" deploy --prebuilt --prod --token "$VERCEL_TOKEN" diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 031a301..17340c1 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -67,6 +67,10 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false + # The Vercel CLI runs under Node; Bun installs and builds the app. + - uses: actions/setup-node@v4 + with: + node-version: 24 - uses: oven-sh/setup-bun@v2 with: bun-version: 1.4.2 diff --git a/changelog.d/deploy-cli-under-node.fixed.md b/changelog.d/deploy-cli-under-node.fixed.md new file mode 100644 index 0000000..ccbafad --- /dev/null +++ b/changelog.d/deploy-cli-under-node.fixed.md @@ -0,0 +1 @@ +Deploy releases to Vercel production again: the deploy job now runs the Vercel CLI under Node. Under Bun, the build output referenced Bun's cache instead of the project's locked Next.js, so Vercel rejected the 0.2.0 deployment.