From 881c6f984643f02c2ebdd3050258f9baf563052d Mon Sep 17 00:00:00 2001 From: Peter Wielander Date: Mon, 4 May 2026 14:12:38 +0900 Subject: [PATCH] [tarballs] Use turbo to build workspace deps before packing The standalone tarballs project's vercel.json sets "buildCommand": "pnpm --filter tarballs build", which only runs the tarballs package's build script (node scripts/pack.ts) and does not trigger turbo's `dependsOn: ["^build"]` chain. Every workspace package gets packed with an empty dist/ directory, so downstream installs fail with errors like "Cannot find module '/dist/next.cjs'". The previous docs-based pipeline didn't hit this because Vercel detected docs as a Next.js framework, ran turbo for it, and pack.ts was wired as a prebuild step that ran after deps were already built. Switch the buildCommand to `pnpm turbo build --filter=tarballs` so turbo evaluates the build task for tarballs, fans out via ^build to compile every workspace dependency first, and only then runs tarballs#build (pack.ts) against the populated dist/ directories. Verified locally: a fresh build now produces tarballs containing the full dist/ tree (including dist/next.cjs). Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/fix-tarballs-build.md | 4 ++++ tarballs/vercel.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-tarballs-build.md diff --git a/.changeset/fix-tarballs-build.md b/.changeset/fix-tarballs-build.md new file mode 100644 index 0000000000..c61d62bc2e --- /dev/null +++ b/.changeset/fix-tarballs-build.md @@ -0,0 +1,4 @@ +--- +--- + +Fix the `tarballs` Vercel project so workspace dependencies are built before packing — without this, every preview tarball ships with an empty `dist/` directory and downstream installs fail to resolve `dist/*` entry points. diff --git a/tarballs/vercel.json b/tarballs/vercel.json index 88798a2855..b2cc93be4f 100644 --- a/tarballs/vercel.json +++ b/tarballs/vercel.json @@ -1,6 +1,6 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "buildCommand": "pnpm --filter tarballs build", + "buildCommand": "pnpm turbo build --filter=tarballs", "installCommand": "pnpm install --frozen-lockfile", "outputDirectory": "public", "framework": null