fix(ci): run codegen/build explicitly for vercel deploys under pnpm 11#3548
Merged
Conversation
…n when polyfill is enabled
pnpm 11 no longer fires the install-time root `prepare` (build-fast) on Vercel, so each deploy hit a missing artifact. Move the build prerequisites into explicit `pre<script>` hooks instead of relying on the lifecycle: - website: prebuild now runs `panda codegen` (generates styled-system) - playground: add prebuild to build packages + db:generate + css:codegen - studio: add predeploy-studio to build packages so cli/dist exists before `node ../cli/bin.js codegen` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ea6ecda The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
segunadebayo
added a commit
that referenced
this pull request
May 23, 2026
#3548) * fix(builder): prevent re-polyfilling of user's layer order declaration when polyfill is enabled * fix(ci): run codegen/build explicitly for vercel deploys under pnpm 11 pnpm 11 no longer fires the install-time root `prepare` (build-fast) on Vercel, so each deploy hit a missing artifact. Move the build prerequisites into explicit `pre<script>` hooks instead of relying on the lifecycle: - website: prebuild now runs `panda codegen` (generates styled-system) - playground: add prebuild to build packages + db:generate + css:codegen - studio: add predeploy-studio to build packages so cli/dist exists before `node ../cli/bin.js codegen`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Under pnpm 11, the install-time root
prepare(husky && pnpm build-fast) no longer fires reliably on Vercel, so each deploy hit a missing build artifact:Module not found: Can't resolve '@/styled-system/css'/'@/styled-system/patterns'—styled-system/(gitignored) was only generated by thepreparelifecycle, never in the build chain.@/styled-system/*resolution failure (plus the Prisma client was also stranded inprepare).Cannot find module './dist/cli-default.js'—packages/cliwas never built, sonode ../cli/bin.js codegenthrewMODULE_NOT_FOUND.Fix
Move each build prerequisite out of the fragile
preparelifecycle and into an explicitpre<script>hook, which pnpm always runs immediately before a directly-invoked script regardless of pnpm version or workspace-root quirks:website/package.jsonprebuildnow ends with&& panda codegenplayground/package.jsonprebuild→ builds packages +db:generate+css:codegenpackage.json(root)predeploy-studio: "pnpm build-fast"preparescripts are left intact for local-dev convenience; they're just no longer load-bearing for the Vercel builds.Verification
Each failure was reproduced locally first, then confirmed green:
styled-system/,prebuildregeneratedcss+patterns(exit 0)styled-system/,prebuildregenerated Prisma client +css+patterns(exit 0)packages/cli/dist(reproducedMODULE_NOT_FOUND),predeploy-studiorebuiltdist/cli-default.js, andprepare-studiocodegen succeeded (exit 0)No changeset — all three are private (non-published) workspace packages.
🤖 Generated with Claude Code