tangly1024 / NotionNext

使用 NextJS + Notion API 实现的,支持多种部署方案的静态博客,无需服务器、零门槛搭建网站,为Notion和所有创作者设计。 (A static blog built with NextJS and Notion API, supporting multiple deployment options. No server required, zero threshold to set up a website. Designed for Notion and all creators.)
https://tangly1024.com
MIT License
7.88k stars 10.83k forks source link

【部署异常】部署渲染提示RangeError: Invalid time value #2933

Open banpie opened 1 week ago

banpie commented 1 week ago

使用全新的Notion Next(4.7.7)渲染出现错误如下。

尝试:

为了方便设定发布日期,我之前曾经在WPS中批量设置了文章的日期,然后复制Excel中的日期字段(yyyy-mm-dd)到notion数据库,曾经也遇到渲染问题,但是后面有人工全部选择所有文章的日期,渲染成功了,但是这一次又不行了。

RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at /vercel/path0/.next/server/pages/index.js:12:2463
    at Array.forEach (<anonymous>)
    at n (/vercel/path0/.next/server/pages/index.js:12:2332)
    at g (/vercel/path0/.next/server/pages/index.js:25:894)
    at async e3 (/vercel/path0/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js:25:3907)
    at async exportPages (/vercel/path0/node_modules/next/dist/export/routes/pages.js:84:28)
    at async exportPageImpl (/vercel/path0/node_modules/next/dist/export/worker.js:205:16)
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
    at async Object.exportPage (/vercel/path0/node_modules/next/dist/export/worker.js:236:20)
> Build error occurred
Error: Invariant: page wasn't built
    at /vercel/path0/node_modules/next/dist/build/index.js:1933:47
    at Array.map (<anonymous>)
    at /vercel/path0/node_modules/next/dist/build/index.js:1930:84
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
    at async /vercel/path0/node_modules/next/dist/build/index.js:1543:17
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
    at async build (/vercel/path0/node_modules/next/dist/build/index.js:366:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1

相应配置 URL: banpie.info Notion page: https://banpie.notion.site/f130c0e18a3245b2963e043b014a577d?v=137ccbb5e0a08090830c000cb6c5a8e8&pvs=4

截图

image

环境

tangly1024 commented 2 days ago

您好 感谢反馈。

想确认一下目前问题是否依然存在?或是已经自行解决?

因为,我发现您粘贴的网站可以正常访问、并展示博客列表。若问题任然存在,并且是由日期导致的异常,可以提供对应的数据,我会定位问题、并在代码中兼容。目前您粘贴的Notion数据库是没有文章的,因此我无法进一步排查问题。