Claude/website missing issue vnf1vx - #4474
Closed
cryfishr-hue wants to merge 12 commits into
Closed
Conversation
當 Notion API 取不到 pageRecordMap 時,convertNotionToSiteData 原本回傳
空物件 {},而不是其他失敗分支都會用的 EmptyData()。這使得下游的
categoryOptions / tagOptions 等欄位變成 undefined,getStaticProps 序列化
時拋出 "undefined cannot be serialized as JSON",導致 /、/404、/archive、
/category、/tag、/search 等頁面全部 prerender 失敗,next build 整包中斷。
在 Vercel 上這代表:Notion 只要在部署當下不可用(頁面取消公開分享、
NOTION_PAGE_ID 失效、Notion 暫時故障),部署就會失敗,網站整個不見,
而不是降級成提示頁。
一併讓 cleanIds / cleanTagOptions / shortenIds 在輸入非陣列時回傳 [],
避免其他缺漏欄位以同樣方式中斷建置。
驗證:在 Notion 不可連線的環境下重跑 next build,
修正前 EXIT=1(Export encountered errors on 27 paths),
修正後 EXIT=0,首頁正常產出並顯示「無法獲取Notion數據」提示頁。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1jrCsUk793KuACZLsCCUc
|
@claude is attempting to deploy a commit to the tangly1024's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for notionnext-netlify ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
已知问题
解决方案
.env.local迁移到package.jsonpackage.json读取版本号改动收益
package.json读取具体改动
blog.config.js测试确认
用户文档(
docs/user-guide//docs/developer/)如果本 PR 新增或修改了站长会使用的功能、主题配置、环境变量、Notion Config 键、插件开关、部署步骤、默认行为或可见 UI 交互,请同步更新
docs/user-guide/或docs/developer/中对应说明,并在下方勾选已完成项。只有纯内部重构、测试、CI、依赖维护、拼写修正等不改变站长使用方式的改动,才可以勾选「不适用」。
docs/user-guide/目录约定conf/*.config.js一致(若文档涉及配置).env、私有 ID文档说明(可选):对应官方 slug / URL、是否与功能 PR 配套