Build failure: missing export 'blog' from @/.source#3901
Merged
owenwahlgren merged 1 commit intoava-labs:masterfrom Feb 26, 2026
Merged
Build failure: missing export 'blog' from @/.source#3901owenwahlgren merged 1 commit intoava-labs:masterfrom
owenwahlgren merged 1 commit intoava-labs:masterfrom
Conversation
) Automated by devrel-agent pipeline. Closes ava-labs#3900
|
@devrel-droid is attempting to deploy a commit to the Ava Labs Team on Vercel. A member of the Team first needs to authorize it. |
owenwahlgren
approved these changes
Feb 26, 2026
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.
What this PR does
Closes #3900: Build failure: missing export 'blog' from @/.source
Now I have a complete picture. Here's my structured implementation plan:
Implementation Plan: Fix
blogMissing from@/.sourceRoot Cause Analysis
The trigger commit (
d552c59d) only changedutils/remote-content/apis.mts(a URL fix for C-Chain RPC docs). It did NOT changesource.config.tsorlib/source.ts. The build failure is a pre-existing issue that was just exposed/surfaced by this deployment.The real cause: The project uses Zod v4.3.5 (
"zod": "^4.1.12"inpackage.json, confirmed inyarn.lock). In Zod v4,z.string().date()returns aZodStringFormattype (not a plainZodString).ZodStringFormatdoes not have the.or()method thatZodStringhad in Zod v3.Line 81 in
source.config.ts:This throws
TypeError: z.string().date().or is not a functionat runtime whenfumadocs-mdxexecutessource.config.tsto generate.source/index.ts. Becauseblogis the last collection in the file, all preceding exports (docs,meta,course,courseMeta,integrations) succeed, butblogis silently dropped.Why
course(line 38) still works:z.string().or(z.date())uses plainz.string()which returnsZodString— this type retained.or()in Zod v4. Only the chained.date()version is affected.Files to Modify
source.config.tsblogschemaNo other files need changes.
lib/source.tsis already correct.Step-by-Step Approach
Step 1 — Fix
source.config.ts(the only required change)In the
blogcollection definition (lines 75–84), replace the Zod v3-style.or()chain with the Zod v4-compatiblez.union():Here is the verification write-up:
Summary
The build failure was caused by a Zod v4 compatibility break in
source.config.ts. The project uses Zod^4.1.12, but theblogcollection'sdatefield used the Zod v3 APIz.string().date().or(z.date()). In Zod v4z.string().date()no longer exists, causingsource.config.tsto fail at schema compilation. When fumadocs-mdx could not process the config, it omitted theblogexport from the auto-generated.source/index.ts, producing the'blog' is not exported from '@/.source'error that broke the build.The fix is a one-line change: replace
z.string().date().or(z.date()).optional()withz.union([z.iso.date(), z.date()]).optional(), which is the Zod v4-compatible equivalent.How to verify
1. Build succeeds
The most direct check — the build must complete without the import error:
yarn build:remote && next buildExpected: no
Import error: 'blog' is not exported from '@/.source'. The build should reach the static-page generation step and finish successfully.2. Blog listing page loads
Visit the blog index on the deployed site:
Expected: The page renders a list of blog posts (28 posts currently exist in
content/blog/). Before this fix, the entire site would 500/fail to compile, so this page would not load at all.3. Individual blog post with a
datefield renders correctlyThe schema change specifically affects the
datefield. Test a post that has an explicitdatefrontmatter value:Expected: Page renders without error. The post has
date: 2025-10-01in its frontmatter — this is an ISO date string thatz.iso.date()must accept.4.
/api/latest-blogsreturns valid JSONThis API route sorts posts by
dateand returns the two most recent:Expected
Self-review: issues found and fixed | QA: passed
Generated by devrel-agent. Comment to trigger a revision cycle.