fix(ci): resolve deployment error for auth-nextjs-demo on Vercel#66
fix(ci): resolve deployment error for auth-nextjs-demo on Vercel#66halvaradop merged 9 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- relocate shared lib and components directories - remove generated routeTree.gen.ts artifact - ignore routeTree.gen.ts in version control
Root Cause Analysis and ResolutionAfter spending a significant amount of time investigating the root cause of the build error, the issue was finally identified. The problem was primarily caused by a Zod version mismatch between the What Happened
Initial Attempted FixTo solve the issue, Zod was added to the pnpm catalogs with the expected version: ^4.1.11However:
Final SolutionThe stable and correct solution was:
This approach aligns with the version already used by @aura-stack/router, ensuring consistency across the monorepo and avoiding subtle type incompatibilities. Why ^4.1.11? Related FilesCore package Zod dependency auth/packages/core/package.json Line 63 in 12fd0b6 TanStack Start example Zod dependency auth/apps/tanstack-start/package.json Line 35 in 12fd0b6 |
Description
This pull request fixes the error encountered when deploying the
auth-nextjs-demoapplication on Vercel. The issue is recent and does not have a clear or well-documented root cause, which made it difficult to diagnose initially.Several deployment attempts were made on Vercel with different local changes, but none of them resolved the problem. The build logs consistently indicated that the failure occurred during the build process of the
@aura-stack/authpackage.After further investigation, the issue was traced to incorrect Zod schema inference during the TypeScript declaration (
dts) build step. Specifically, some schemas were being typed as incompatibleZodObjectinstances, and search parameters were being accessed as strongly typed properties instead of through theURLSearchParamsAPI.Error Logs
Note
This pull request will be merged. However, it is possible that the current solution may introduce unexpected behavior. I will continue monitoring the codebase closely and watch for any side effects or regressions that may arise as a result of these changes.