Skip to content

Run the Vercel CLI under Node in the deploy job - #8

Merged
anth-volk merged 1 commit into
mainfrom
fix/deploy-cli-under-node
Oct 14, 2026
Merged

anth-volk merged 1 commit into
mainfrom
fix/deploy-cli-under-node

Conversation

@anth-volk

@anth-volk anth-volk commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10

The first automated release (0.2.0) verified and tagged, but its deploy failed (run 38641065333). Vercel stopped while downloading the prebuilt files:

Error: ENOENT: no such file or directory, readlink '/.bun/install/cache/next@16.4.1@@@1/dist/compiled/next-server/server.runtime.prod.js'

Production still serves the earlier manual deployment.

Cause

deploy-production.sh ran the Vercel CLI under the Bun runtime (bunx --bun). When the CLI started, the checkout had no node_modules, so Bun's auto-install was active. The CLI's Next.js builder then resolved next through Bun's global cache: it installed the latest release (16.4.1) instead of using the locked 16.4.0 that vercel build installed moments later. The function configs in the build output then pointed at a file in ~/.bun/install/cache, which doesn't exist on Vercel's side.

Change

  • deploy-production.sh runs the same pinned CLI, vercel@58.8.0, through npx, so it runs under Node.
  • The deploy job sets up Node 24 before Bun. Bun still installs and builds the app, as before.
  • changelog.d/deploy-cli-under-node.fixed.md: merging releases 0.2.1 and deploys it.

Evidence

Local builds of the 0.2.0 release commit (1dfe03a2), each from a fresh checkout:

CLI runtime Detected Next.js Build-output references to Bun's cache
Bun 16.4.1 4 function configs
Node 16.4.0 none

A Node-built output of the same commit was deployed as a preview (not production) with vercel deploy --prebuilt, and reached READY.

Format check, actionlint and bash -n pass locally. The deploy job itself only runs on main, so this PR's checks don't exercise it.

No environment variable changes. VERCEL_TOKEN (GitHub Production environment), VERCEL_ORG_ID and VERCEL_PROJECT_ID (inline in the job) are wired as before.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
microcosm-runs Ready Ready Preview Oct 14, 2026 9:44pm UTC

Request Review

@anth-volk
anth-volk merged commit 15cf048 into main Oct 14, 2026
6 checks passed
@anth-volk
anth-volk deleted the fix/deploy-cli-under-node branch October 14, 2026 21:49

This branch was successfully deployed

1 active deployment
Preview — b0d07fca Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release deploys fail because Vercel can't read Bun's install cache

1 participant