chore(deploy): bulletproof Vercel build config#17
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three-layer defence against the
rootDirectory/pnpm misconfiguration that caused thedev→mainpreview build to fail withastro: command not found.What broke
Vercel's Git integration had no
rootDirectoryconfigured, so it built from the repo root instead ofweb/, detected nopnpm-lock.yamlthere, fell back tonpm, and failed to findastro.Fixes
web/.vercel/project.json(now committed)web/vercel.jsonframework,installCommand,buildCommand,outputDirectory— dashboard settings can no longer drift silently--frozen-lockfileon installTest plan
astro: command not found)pnpm install --frozen-lockfile && pnpm buildsucceeds locally.vercel/project.jsonpresent inweb/after fresh clone