Fix Vercel pnpm install failures from the stale lockfile and an undeclared dependency#67

merged
main
capy/preview-coverage
opened1d agobyFFayeque Peerzade

Follow-up to #66 (merged at 4f74947): the Vercel deploy of capy/preview-coverage failed at install with ERR_PNPM_OUTDATED_LOCKFILE, and fixing that exposed a second, latent build failure. Both are fixed in 0ca9549.

Root causes

  1. Stale pnpm-lock.yaml. The 28 story dependencies added in the #64 campaign were installed with npm, which updates package-lock.json only. Vercel installs with pnpm in CI mode (frozen lockfile), so the stale pnpm-lock.yaml aborted the deploy. Regenerated with pnpm 10.34.6 (the major Vercel selects).
  2. Undeclared @internationalized/date. Three preview stories import react-aria's date utilities (components/preview-stories/{intent-ui,react-aria-1,react-aria-2}.tsx) without declaring the package. npm's flat layout hid it; pnpm's strict layout — locally and on Vercel alike — fails with Module not found. Declared as ^3.12.4, matching what react-aria resolves.

Verification

  • pnpm install --frozen-lockfile (Vercel's exact install command) exits 0.
  • npm test is 143/143 pass, 0 fail (build + previews + node tests).
  • The Vercel deploy of capy/preview-coverage is green ("Deployment has completed").

Going forward

Any dependency change must regenerate pnpm-lock.yaml (with pnpm 10, e.g. npx -y pnpm@10 install --lockfile-only) before pushing, or the deploy fails the same way.

FFayeque Peerzadeopened·1d ago