Skip to content

fix: stop .vercelignore withholding files the prebuilt deploy needs - #8

Merged
code-x-1010 merged 1 commit into
mainfrom
fix/vercelignore-prebuilt
Sep 8, 2026
Merged

code-x-1010 merged 1 commit into
mainfrom
fix/vercelignore-prebuilt

Conversation

@code-x-1010

Copy link
Copy Markdown
Collaborator

Deploy API (production) now builds fine (uv is installed) and fails at the upload step instead:

Error: ENOENT: no such file or directory, lstat '/vercel/path0/.github/workflows/ci.yml'

Cause

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. Anything 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 can't disagree. Only --prebuilt splits 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 .env out 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 .env entries are now listed one by one rather than .env.* plus negations for the two tracked *.example files. If the negation didn't apply, those would be excluded, bundled, and missing — the very failure this fixes.

Pipeline progress

Run Died at Cause
1 vercel pull secrets not set
2 vercel pull token scoped to personal account
3 vercel build uv missing
4 upload this

test, alembic upgrade head and vercel build are all green now.

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.
@code-x-1010
code-x-1010 merged commit 176d03d into main Sep 8, 2026
9 of 10 checks passed
@code-x-1010
code-x-1010 deleted the fix/vercelignore-prebuilt branch September 9, 2026 22:54
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.

1 participant