Skip to content

Fix the Vercel build and make the Vercel setup one-click - #2

Merged
biluses merged 3 commits into
masterfrom
claude/clone-build-autonomous-repo-lou6ef
Sep 19, 2026
Merged

biluses merged 3 commits into
masterfrom
claude/clone-build-autonomous-repo-lou6ef

Conversation

@biluses

@biluses biluses commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Why

The first production deploy of the vitrina Vercel project (commit 52f9522) failed with ENOENT .next/next-server.js.nft.json: Vercel's packaging trips over output: "standalone". The build log also showed the migration running against a local file database because no Turso variables were present.

What changes

  • next.config.ts: output: "standalone" only when not building on Vercel (the Dockerfile still gets it).
  • src/instrumentation.ts + src/instrumentation-node.ts: the boot migration lives in a Node-only module behind the runtime check, so the edge bundle no longer warns; it is skipped on Vercel where vercel-build migrates at build time.
  • scripts/migrate.mjs: on Vercel, a file: database is a configuration error — the build fails immediately with the exact fix instead of shipping a broken deployment.
  • Carries the earlier "one-click Vercel" commit that PR Replace the legacy PHP ERP with Vitrina, an AI product-visuals studio for e-commerce #1 was merged without: TURSO_DATABASE_URL / TURSO_AUTH_TOKEN honoured, vercel-build script, Blob storage detected from BLOB_READ_WRITE_TOKEN alone.

Verified

  • VERCEL=1 pnpm build succeeds with no standalone output; plain pnpm build still produces it.
  • VERCEL=1 node scripts/migrate.mjs exits 1 with the message when no remote database is configured.
  • Lint, typecheck, 34 unit tests green.

After merging

Set in the Vercel project (Settings → Environment Variables): APP_SECRET, APP_URL, HF_API_BASE_URL, PLATFORM_API_KEY; add the Turso integration and a Blob store. See docs/DEPLOY.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU


Generated by Claude Code

biluses and others added 2 commits September 18, 2026 15:11
…ob auto-detected

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
…ation, fail fast without a remote database

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
@vercel

vercel Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
vitrina Error Error Sep 18, 2026 3:15pm UTC

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QktEqYfYA1H2gQRbvG88pU
@biluses
biluses merged commit fd867c6 into master Sep 19, 2026
2 of 4 checks passed

This branch had an error being deployed

1 failed deployment
Preview — 5e70ae3d Deployed Sep 18, 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.

1 participant