Skip to content

fix(build): resolve production deploy failures in Vercel's function build - #700

Merged
collinsezedike merged 3 commits into
mainfrom
fix/vercel-production-build
Sep 1, 2026
Merged

fix(build): resolve production deploy failures in Vercel's function build#700
collinsezedike merged 3 commits into
mainfrom
fix/vercel-production-build

Conversation

@collinsezedike

Copy link
Copy Markdown
Collaborator

Summary

Production has failed to deploy on every merge to main since #635, roughly 14 hours as of this PR. The root cause is two independent build bugs that a "redeploy without build cache" does not fix, since neither is actually a caching issue:

  1. Vercel's isolated per-function build for api/**/*.ts cannot reliably resolve @meridian/shared/@meridian/api-core/@meridian/stellar-sdk-helpers's exports through their package.json#types field, which points directly at src/index.ts. scripts/build-vercel.sh only esbuild-bundles these three packages' JS and never generates their .d.ts files, even though each package's own tsconfig.json already sets declaration: true. Fixed by running tsc --emitDeclarationOnly for each in the build script and pointing types at the resulting dist/index.d.ts.
  2. The production apps/web build fails outright with Rolldown failed to resolve import "tslib" from rxjs, a transitive dependency of @creit.tech/xbull-wallet-connect (added in feat(wallet): add XBullWallet adapter #598). rxjs's ESM5 build imports tslib without it being resolvable in the dependency tree under Vite 8's Rolldown bundler. Fixed by adding tslib as a direct dependency of apps/web.

Both were verified by running scripts/build-vercel.sh locally end to end, which now completes successfully and produces the full dist/ output (landing, app, docs) that previously failed on both counts.

Test plan

  • bash scripts/build-vercel.sh (via pnpm exec) completes successfully end to end
  • pnpm typecheck and pnpm typecheck:api pass
  • pnpm lint passes
  • pnpm test passes (146/146 web tests, full suite)
  • Generated .d.ts files for shared/api-core/stellar-sdk-helpers contain the expected exports

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
meridian Error Error Sep 1, 2026 10:16am UTC

@collinsezedike
collinsezedike merged commit e762115 into main Sep 1, 2026
9 of 10 checks passed
@collinsezedike
collinsezedike deleted the fix/vercel-production-build branch September 1, 2026 10:18
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