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.74k stars 10.67k forks source link

【部署报错】4.2.0部署问题 #1797

Open neverrop opened 9 months ago

neverrop commented 9 months ago

描述遇到的问题 用最新版4.2.0部署报错了,代码完全没有改, 配置了notion config页面,为什么会找不到啊 https://binhua.notion.site/binhua/8db9d1c508e2420da9dfacfa0446802d?v=b1f86708f05b407e9912bb2b75ddcacf

[18:20:08.501] Running build in Washington, D.C., USA (East) – iad1
[18:20:08.605] Cloning github.com/neverrop/NotionNext (Branch: main, Commit: 2594104)
[18:20:10.475] Cloning completed: 1.868s
[18:20:15.778] Restored build cache
[18:20:15.858] Running "vercel build"
[18:20:16.337] Vercel CLI 33.2.0
[18:20:16.798] Installing dependencies...
[18:20:18.109] npm WARN old lockfile 
[18:20:18.110] npm WARN old lockfile The package-lock.json file was created with an old version of npm,
[18:20:18.110] npm WARN old lockfile so supplemental metadata must be fetched from the registry.
[18:20:18.110] npm WARN old lockfile 
[18:20:18.110] npm WARN old lockfile This is a one-time fix-up, please be patient...
[18:20:18.111] npm WARN old lockfile 
[18:20:33.570] 
[18:20:33.571] up to date in 16s
[18:20:33.571] 
[18:20:33.571] 156 packages are looking for funding
[18:20:33.572]   run `npm fund` for details
[18:20:33.603] Detected Next.js version: 13.3.1
[18:20:33.609] Detected `package-lock.json` generated by npm 7+
[18:20:33.609] Running "npm run build"
[18:20:34.084] 
[18:20:34.084] > notion-next@4.2.0 build
[18:20:34.085] > next build
[18:20:34.085] 
[18:20:34.348] info  - Loaded env from /vercel/path0/.env.local
[18:20:34.490] warn  - You have enabled experimental feature (scrollRestoration) in next.config.js.
[18:20:34.491] warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
[18:20:34.491] 
[18:20:34.613] info  - Linting and checking validity of types...
[18:20:38.933] info  - Creating an optimized production build...
[18:20:39.179] 加载默认主题 /vercel/path0/themes/simple
[18:20:39.210] 加载默认主题 /vercel/path0/themes/simple
[18:20:39.215] 加载默认主题 /vercel/path0/themes/simple
[18:21:09.478] info  - Compiled successfully
[18:21:09.487] info  - Collecting page data...
[18:21:11.290] [请求API] from:category-paths id:8db9d1c508e2420da9dfacfa0446802d 
[18:21:11.308] [请求API] from:slug-paths id:8db9d1c508e2420da9dfacfa0446802d 
[18:21:11.330] [请求API] from:slug-paths id:8db9d1c508e2420da9dfacfa0446802d 
[18:21:11.349] [请求API] from:slug-paths id:8db9d1c508e2420da9dfacfa0446802d 
[18:21:12.429] [响应成功]: from:slug-paths
[18:21:12.430] [API耗时] 1100ms
[18:21:12.454] [Notion配置] 未找到配置页面
[18:21:12.466] [缓存]: from:category-paths root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:12.484] [缓存]: from:page-paths root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:12.501] [缓存]: from:tag-static-path root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:12.506] [缓存]: from:tag-page-static-path root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:12.630] [响应成功]: from:category-paths
[18:21:12.631] [API耗时] 1342ms
[18:21:12.648] [Notion配置] 未找到配置页面
[18:21:12.874] [响应成功]: from:slug-paths
[18:21:12.875] [API耗时] 1535ms
[18:21:12.889] [Notion配置] 未找到配置页面
[18:21:16.079] [响应成功]: from:slug-paths
[18:21:16.080] [API耗时] 4772ms
[18:21:16.094] [Notion配置] 未找到配置页面
[18:21:27.882] info  - Generating static pages (0/40)
[18:21:28.191] [缓存]: from:404 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.340] [缓存]: from:slug-props-article/a4cc310d-77a1-4a3e-bbee-da2f64934ed4 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.348] [请求API] from:slug-props-article/a4cc310d-77a1-4a3e-bbee-da2f64934ed4 id:a4cc310d-77a1-4a3e-bbee-da2f64934ed4 
[18:21:28.397] [缓存]: from:archive-index root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.406] [缓存]: from:category-index-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.434] [缓存]: from:index root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.437] [缓存]: from:category-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.440] [请求API] from:rss-content id:a4cc310d-77a1-4a3e-bbee-da2f64934ed4 
[18:21:28.452] info  - Generating static pages (10/40)
[18:21:28.457] [缓存]: from:category-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.475] [缓存]: from:category-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.486] [缓存]: from:search-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.510] [响应成功]: from:slug-props-article/a4cc310d-77a1-4a3e-bbee-da2f64934ed4
[18:21:28.510] [API耗时] 161ms
[18:21:28.542] [缓存]: from:tag-index-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.612] info  - Generating static pages (20/40)
[18:21:28.612] [缓存]: from:search-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.613] [缓存]: from:search-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.622] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.642] [缓存]: from:slug-props-article/83c4741e-8c0a-497f-a87f-2ad1d950bcd6 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.648] [请求API] from:slug-props-article/83c4741e-8c0a-497f-a87f-2ad1d950bcd6 id:83c4741e-8c0a-497f-a87f-2ad1d950bcd6 
[18:21:28.650] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.661] [响应成功]: from:rss-content
[18:21:28.662] [API耗时] 221ms
[18:21:28.675] [请求API] from:rss-content id:72fd21a7-8216-41f4-8a31-c6456a766114 
[18:21:28.681] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.692] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.701] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.712] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.720] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.726] info  - Generating static pages (30/40)
[18:21:28.728] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.738] [缓存]: from:tag-props root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.940] [响应成功]: from:slug-props-article/83c4741e-8c0a-497f-a87f-2ad1d950bcd6
[18:21:28.941] [API耗时] 292ms
[18:21:28.953] Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btype%2C%20option%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
[18:21:28.954]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:490)
[18:21:28.955]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:479)
[18:21:28.955]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.955]     at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
[18:21:28.955]     at bd (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
[18:21:28.955]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
[18:21:28.956]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:479)
[18:21:28.956]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.956]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:481)
[18:21:28.956]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.956] 
[18:21:28.957] Error occurred prerendering page "/article/83c4741e-8c0a-497f-a87f-2ad1d950bcd6". Read more: https://nextjs.org/docs/messages/prerender-error
[18:21:28.957] Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btype%2C%20option%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
[18:21:28.957]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:490)
[18:21:28.957]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:479)
[18:21:28.958]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.958]     at $c (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
[18:21:28.958]     at bd (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
[18:21:28.958]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
[18:21:28.958]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:479)
[18:21:28.958]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.959]     at Zc (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:481)
[18:21:28.959]     at Z (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
[18:21:28.962] [缓存]: from:slug-props-article/f7983d17-4e6c-45ba-8b56-ed03d61e2d81 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:28.970] [请求API] from:slug-props-article/f7983d17-4e6c-45ba-8b56-ed03d61e2d81 id:f7983d17-4e6c-45ba-8b56-ed03d61e2d81 
[18:21:29.106] [响应成功]: from:slug-props-article/f7983d17-4e6c-45ba-8b56-ed03d61e2d81
[18:21:29.107] [API耗时] 139ms
[18:21:29.127] [缓存]: from:slug-props-article/1bfd5509-cd40-4e05-b3cf-fe716c27274d root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:29.128] [请求API] from:slug-props-article/1bfd5509-cd40-4e05-b3cf-fe716c27274d id:1bfd5509-cd40-4e05-b3cf-fe716c27274d 
[18:21:29.250] [响应成功]: from:slug-props-article/1bfd5509-cd40-4e05-b3cf-fe716c27274d
[18:21:29.250] [API耗时] 122ms
[18:21:29.268] [缓存]: from:slug-props-article/025a0063-7308-4e74-b1fc-ed35021efcf3 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:29.270] [请求API] from:slug-props-article/025a0063-7308-4e74-b1fc-ed35021efcf3 id:025a0063-7308-4e74-b1fc-ed35021efcf3 
[18:21:29.614] [响应成功]: from:rss-content
[18:21:29.615] [API耗时] 940ms
[18:21:29.661] [请求API] from:rss-content id:22604ef7-6630-4b56-8e4c-3c6d7960e30c 
[18:21:29.704] [响应成功]: from:slug-props-article/025a0063-7308-4e74-b1fc-ed35021efcf3
[18:21:29.704] [API耗时] 434ms
[18:21:29.723] [缓存]: from:slug-props-article/72fd21a7-8216-41f4-8a31-c6456a766114 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:29.725] [请求API] from:slug-props-article/72fd21a7-8216-41f4-8a31-c6456a766114 id:72fd21a7-8216-41f4-8a31-c6456a766114 
[18:21:29.796] [响应成功]: from:rss-content
[18:21:29.796] [API耗时] 136ms
[18:21:29.801] [请求API] from:rss-content id:83c4741e-8c0a-497f-a87f-2ad1d950bcd6 
[18:21:30.112] [响应成功]: from:rss-content
[18:21:30.112] [API耗时] 313ms
[1
<img width="920" alt="Screenshot 2024-01-22 at 18 24 54" src="https://github.com/tangly1024/NotionNext/assets/12857073/2e337747-3bfe-40ae-930a-2ebb3abd06c3">
8:21:30.117] /vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:74
[18:21:30.117] [];do f.push(c.value),c=d.next();while(!c.done);Kb(a,b,f)}return}a=Object.prototype.toString.call(c);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(c).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof c?(d=b.blockedSegment,d.lastPushedText=Ha(b.blockedSegment.chunks,c,a.responseState,d.lastPushedText)):"number"===typeof c&&(d=b.blockedSegment,d.lastPushedText=Ha(b.blockedSegment.chunks,
[18:21:30.117]                                                                                                            ^
[18:21:30.117] 
[18:21:30.117] Error: Objects are not valid as a React child (found: object with keys {type, option}). If you meant to render a collection of children, use an array instead.
[18:21:30.117]     at W (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:74:108)
[18:21:30.117]     at Ib (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:68:479)
[18:21:30.117]     at W (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
[18:21:30.117]     at Jb (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:76:98)
[18:21:30.117]     at Kb (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:75:140)
[18:21:30.117]     at W (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:345)
[18:21:30.117]     at Ib (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:68:479)
[18:21:30.117]     at W (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
[18:21:30.117]     at Ib (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:67:482)
[18:21:30.117]     at W (/vercel/path0/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js:73:89)
[18:21:30.117] 
[18:21:30.117] Node.js v18.18.2
[18:21:30.164] Static worker unexpectedly exited with code: 1 and signal: null
[18:21:30.528] [响应成功]: from:slug-props-article/72fd21a7-8216-41f4-8a31-c6456a766114
[18:21:30.528] [API耗时] 799ms
[18:21:30.632] Warning: data for page "/[prefix]/[slug]" (path "/article/72fd21a7-8216-41f4-8a31-c6456a766114") is 227 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
[18:21:30.632] See more info here: https://nextjs.org/docs/messages/large-page-data
[18:21:30.693] [缓存]: from:slug-props-article/early_stopping root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:30.694] [请求API] from:slug-props-article/early_stopping id:22604ef7-6630-4b56-8e4c-3c6d7960e30c 
[18:21:30.948] [响应成功]: from:slug-props-article/early_stopping
[18:21:30.948] [API耗时] 254ms
[18:21:30.974] [缓存]: from:slug-props-article/b55948ed-d1f1-4980-b6d8-6915a1c5f32d root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:30.978] [请求API] from:slug-props-article/b55948ed-d1f1-4980-b6d8-6915a1c5f32d id:b55948ed-d1f1-4980-b6d8-6915a1c5f32d 
[18:21:31.379] [响应成功]: from:slug-props-article/b55948ed-d1f1-4980-b6d8-6915a1c5f32d
[18:21:31.379] [API耗时] 401ms
[18:21:31.396] [缓存]: from:slug-props-article/d1a657ca-0c23-427a-8ad5-3c64fed11675 root-page-id:8db9d1c508e2420da9dfacfa0446802d
[18:21:31.397] [请求API] from:slug-props-article/d1a657ca-0c23-427a-8ad5-3c64fed11675 id:d1a657ca-0c23-427a-8ad5-3c64fed11675 
[18:21:31.839] [响应成功]: from:slug-props-article/d1a657ca-0c23-427a-8ad5-3c64fed11675
[18:21:31.839] [API耗时] 443ms
[18:21:31.893] info  - Generating static pages (40/40)
[18:21:31.900] 
[18:21:31.900] > Export encountered errors on following paths:
[18:21:31.900]  /[prefix]/[slug]: /article/83c4741e-8c0a-497f-a87f-2ad1d950bcd6
[18:21:31.979] Error: Command "npm run build" exited with 1
[18:21:32.277] 

相应配置 https://sahinka.top

截图

Screenshot 2024-01-22 at 18 24 54

环境

starvsstar commented 9 months ago

可能是你修改了notion配置文件,导致构建的时候找不到一些配置。可以把notion的配置文件勾选全部去掉试一试。

neverrop commented 9 months ago

可能是你修改了notion配置文件,导致构建的时候找到到一些配置,比如./Life Coding Investment路径。可以把notion的配置文件勾选全部去掉试一试。

notion里配置中心的各种配置吗,没看到什么奇怪的配置啊,我都取消了试了试也不行。

tangly1024 commented 9 months ago

参考此issue:https://github.com/tangly1024/NotionNext/issues/1813

neverrop commented 9 months ago

@tangly1024 解决了,谢谢