fix: stop .vercelignore withholding files the prebuilt deploy needs - #8
Merged
Merged
Conversation
Deploy API failed at the upload step: Error: ENOENT: no such file or directory, lstat '/vercel/path0/.github/workflows/ci.yml' CI builds with `vercel build` and ships with `vercel deploy --prebuilt`. The build records every reachable file in .vercel/output's file map -- Python functions have no tree-shaking -- and the upload then applies .vercelignore. Any path excluded there that the build already recorded leaves the deployment referencing a file that was never sent. .vercelignore excluded .github, docs, examples, docker, apps/web and both test directories: all tracked, so all present in a CI checkout, so all bundled and then withheld. The manual first deploy never hit this because plain `vercel deploy` builds remotely from the uploaded files, where the two views cannot disagree. The rule is now stated in the file: only list paths absent from the machine that runs the build, which in practice means nothing tracked in git. What remains is gitignored or generated, and still covers the reason the file exists -- keeping a developer's local .env out of a laptop deploy, where it would otherwise supply any variable the Vercel project does not set, including an AI provider and key. The .env entries are now listed one by one instead of `.env.*` with negations for the two tracked examples: if the negation did not apply, those would be excluded, bundled and missing -- the same failure this commit fixes.
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.
Deploy API (production)now builds fine (uv is installed) and fails at the upload step instead:Cause
CI builds with
vercel buildand ships withvercel deploy --prebuilt. The build records every reachable file in.vercel/output's file map — Python functions have no tree-shaking — and the upload then applies.vercelignore. Anything excluded there that the build already recorded leaves the deployment referencing a file that was never sent..vercelignoreexcluded.github,docs,examples,docker,apps/weband both test directories. All tracked, so all present in a CI checkout, so all bundled and then withheld.The manual first deploy never hit this because plain
vercel deploybuilds remotely from the uploaded files, where the two views can't disagree. Only--prebuiltsplits them.Fix
The rule is now stated in the file itself: only list paths absent from the machine that runs
vercel build— in practice, nothing tracked in git.What remains is gitignored or generated, and still covers the reason the file exists: keeping a developer's local
.envout of a laptop deploy, where it would otherwise supply any variable the Vercel project doesn't set, including an AI provider and its key.The
.enventries are now listed one by one rather than.env.*plus negations for the two tracked*.examplefiles. If the negation didn't apply, those would be excluded, bundled, and missing — the very failure this fixes.Pipeline progress
vercel pullvercel pullvercel buildtest,alembic upgrade headandvercel buildare all green now.