Skip to content

chore(deploy): bulletproof Vercel build config#17

Merged
deaneeth merged 1 commit into
devfrom
chore/bulletproof-vercel-build
Jun 5, 2026
Merged

chore(deploy): bulletproof Vercel build config#17
deaneeth merged 1 commit into
devfrom
chore/bulletproof-vercel-build

Conversation

@deaneeth

@deaneeth deaneeth commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

Three-layer defence against the rootDirectory/pnpm misconfiguration that caused the dev→main preview build to fail with astro: command not found.

What broke

Vercel's Git integration had no rootDirectory configured, so it built from the repo root instead of web/, detected no pnpm-lock.yaml there, fell back to npm, and failed to find astro.

Fixes

Layer File Effect
1 web/.vercel/project.json (now committed) Project link is in the repo — re-linking never needed, correct project always targeted
2 web/vercel.json Explicit framework, installCommand, buildCommand, outputDirectory — dashboard settings can no longer drift silently
3 --frozen-lockfile on install Prevents silent lockfile mutations during CI that could cause pnpm version skew

Test plan

  • Merge and confirm Vercel preview build passes (no astro: command not found)
  • pnpm install --frozen-lockfile && pnpm build succeeds locally
  • .vercel/project.json present in web/ after fresh clone

Three-layer defence against the rootDirectory/pnpm misconfiguration that
caused the dev→main preview build to error:

1. Commit web/.vercel/project.json — project link is in the repo so
   re-linking is never required and the correct project is always targeted.

2. Explicit build commands in web/vercel.json — framework, installCommand,
   buildCommand, and outputDirectory are now declared in the file Vercel
   reads when rootDirectory=web. Dashboard settings can no longer drift
   silently; the file is the source of truth.

3. pnpm install --frozen-lockfile — prevents silent lockfile mutations
   during CI installs that could cause version skew.
@deaneeth deaneeth added build Build system / toolchain change chore Maintenance and tooling labels Jun 5, 2026
@deaneeth deaneeth self-assigned this Jun 5, 2026
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-tpu Ready Ready Preview, Comment Jun 5, 2026 5:31pm

@deaneeth deaneeth merged commit 3e5b6b4 into dev Jun 5, 2026
4 checks passed
@deaneeth deaneeth deleted the chore/bulletproof-vercel-build branch June 5, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system / toolchain change chore Maintenance and tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant