Kenshin / simpread

简悦 ( SimpRead ) - 让你瞬间进入沉浸式阅读的扩展
http://ksria.com/simpread
GNU General Public License v3.0
8.04k stars 529 forks source link

notionNext 在vercel平台上构建成功但会无响应 #4186

Open trylang opened 2 years ago

trylang commented 2 years ago

请说明发生问题的环境

简悦包含了很多平台的版本,所以为了方便定位,建议告诉我一些必要信息

请描述你的问题

  1. fock的项目是notion-next,正确配置了page ID,在本地可正常访问localhost:3000,notion新增数据也可正常访问,跳转详情没问题;
  2. 使用vercel进行构建部署,首页可以正常访问,但是无法点击详情或者任何链接,过不久浏览器就会提示页面无响应。
  3. 是因为我的域名填写不对么?我自己没有域名。

截图

image image image

image

Kenshin commented 2 years ago

嗨,试试下面的方案

打开选项页 → 高级设定 → 词法分析引擎 → 关闭此选项

image

trylang commented 2 years ago

感谢您能及时回应哈。但是我把选项都关闭,然后再导入一篇notion,并不好使。

image image
Kenshin commented 2 years ago

关闭这个选项后重启浏览器,确认已经关闭,然后在隐身模式下,在看看。

页面崩溃跟简悦没关系,你看到的页面是 notionnext 生成的。

你也可以把 URL 给我看看,

trylang commented 2 years ago

https://blog-two-lemon.vercel.app/ https://blog-git-main-trylang.vercel.app/ https://blog-k0tqyv2q1-trylang.vercel.app/

您要的是vercel访问地址么?是以上三个。我按照您说的步骤试了一遍,还是不好使,换浏览器也是同样问题。不太清楚是因为什么原因造成的。因为对vercel部署也是头一次,难道是我部署有问题?

Kenshin commented 2 years ago

emmm 有意思,确实如此,但仍然跟简悦无关,因为我把简悦关了也是同样类似的问题(卡死)

@Joel2561 帮忙看下这个问题。

Joel2561 commented 2 years ago

如 @Kenshin 所说,这个问题确实和简悦无关,可以试试到 notionnext 那边提一下这个问题。 不过我最近两天没太有时间,如果方便可以贴出 vercel 的 build log 和 function log,方便看看有无报错。 另外我前两天也拉取过最新的仓库,部署是没有问题的。

trylang commented 2 years ago

各位大佬好,我把我构建过程贴一下:

  1. fork大佬项目代码到自己仓库:https://github.com/trylang/NotionNext

  2. 修改main分支下的blog.config.js,改动地方就是pageID,替换个人信息,替换public/bg_image.png;

  3. 对main分支在vercel下进行构建,截图如下:

    image image image
  4. building 日志文件: [10:33:27.759] Cloning github.com/trylang/NotionNext (Branch: main, Commit: 3da0509) [10:33:28.576] Cloning completed: 816.528ms [10:33:28.746] Installing build runtime... [10:33:31.096] Build runtime installed: 2.349s [10:33:31.404] No Build Cache available [10:33:31.664] Installing dependencies... [10:33:31.980] yarn install v1.22.17 [10:33:32.040] info No lockfile found. [10:33:32.051] [1/4] Resolving packages... [10:33:38.868] warning valine > leancloud-storage > superagent@3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases. [10:33:38.901] warning valine > leancloud-storage > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [10:33:38.968] warning valine > leancloud-storage > leancloud-realtime > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [10:33:38.977] warning valine > leancloud-storage > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau [10:33:39.337] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent@5.3.1: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases. [10:33:39.346] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau [10:33:42.355] [2/4] Fetching packages... [10:34:13.991] [3/4] Linking dependencies... [10:34:13.994] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react@0.13.x || 0.14.x || 15.x.x". [10:34:13.994] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react-dom@0.13.x || 0.14.x || 15.x.x". [10:34:13.996] warning "react-facebook > react-spinner-children@1.0.8" has incorrect peer dependency "react@15.x || 16.x". [10:34:13.997] warning " > react-messenger-customer-chat@0.8.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0". [10:34:13.997] warning "react-notion-x > react-image@4.0.3" has unmet peer dependency "@babel/runtime@>=7". [10:34:13.998] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react@^15 || ^16". [10:34:13.998] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react-dom@^15 || ^16". [10:34:13.999] warning "react-notion-x > react-pdf > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". [10:34:14.005] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [10:34:32.308] [4/4] Building fresh packages... [10:34:32.968] success Saved lockfile. [10:34:32.976] Done in 61.00s. [10:34:33.012] Detected Next.js version: 12.2.1 [10:34:33.014] Running "yarn run build" [10:34:33.365] yarn run v1.22.17 [10:34:33.428] $ next build && next-sitemap --config next-sitemap.config.js [10:34:33.770] info - Loaded env from /vercel/path0/.env.local [10:34:34.013] Attention: Next.js now collects completely anonymous telemetry regarding usage. [10:34:34.013] This information is used to shape Next.js' roadmap and prioritize features. [10:34:34.014] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [10:34:34.014] https://nextjs.org/telemetry [10:34:34.014] [10:34:34.142] info - Linting and checking validity of types... [10:34:37.549] info - Creating an optimized production build... [10:34:37.616] Attention: Next.js now collects completely anonymous telemetry regarding usage. [10:34:37.616] This information is used to shape Next.js' roadmap and prioritize features. [10:34:37.616] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [10:34:37.616] https://nextjs.org/telemetry [10:34:37.616] [10:35:39.916] info - Compiled successfully [10:35:39.917] info - Collecting page data... [10:35:41.531] [请求API] from:slug-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:41.647] [请求API] from:slug-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:41.811] [请求API] from:category-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:41.828] [响应成功]: from:slug-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:41.828] [API耗时] 299ms [10:35:41.837] PageIds: 从collectionQuery获取 { [10:35:41.837] '90e70b50-48d1-49cd-9060-868f49998341': { [10:35:41.837] '62c55b9e-c9b0-4ef1-8424-9ad148214bb6': { collection_group_results: [Object] }, [10:35:41.837] '4966ce69-1f9f-4b03-9e66-1935066a6925': { collection_group_results: [Object] }, [10:35:41.838] '99a90ed2-c4f2-4ba6-b382-7dd04767d526': { collection_group_results: [Object] } [10:35:41.838] } [10:35:41.838] } [10:35:41.839] 请不要使用emoji作为站点图标 📒 [10:35:41.882] [命中缓存]: from:page-paths root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:41.894] [命中缓存]: from:tag-static-path root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:41.942] [响应成功]: from:slug-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:41.943] [API耗时] 297ms [10:35:41.949] PageIds: 从collectionQuery获取 { [10:35:41.949] '90e70b50-48d1-49cd-9060-868f49998341': { [10:35:41.950] '62c55b9e-c9b0-4ef1-8424-9ad148214bb6': { collection_group_results: [Object] }, [10:35:41.950] '99a90ed2-c4f2-4ba6-b382-7dd04767d526': { collection_group_results: [Object] }, [10:35:41.950] '4966ce69-1f9f-4b03-9e66-1935066a6925': { collection_group_results: [Object] } [10:35:41.950] } [10:35:41.950] } [10:35:41.950] 请不要使用emoji作为站点图标 📒 [10:35:42.061] [响应成功]: from:category-paths id:15d115babab049e7b3978a3b04aa9daf [10:35:42.062] [API耗时] 251ms [10:35:42.070] PageIds: 从collectionQuery获取 { [10:35:42.070] '90e70b50-48d1-49cd-9060-868f49998341': { [10:35:42.070] '62c55b9e-c9b0-4ef1-8424-9ad148214bb6': { collection_group_results: [Object] }, [10:35:42.070] '4966ce69-1f9f-4b03-9e66-1935066a6925': { collection_group_results: [Object] }, [10:35:42.071] '99a90ed2-c4f2-4ba6-b382-7dd04767d526': { collection_group_results: [Object] } [10:35:42.071] } [10:35:42.071] } [10:35:42.071] 请不要使用emoji作为站点图标 📒 [10:35:43.952] info - Generating static pages (0/26) [10:35:44.185] [命中缓存]: from:404 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.239] [命中缓存]: from:category-index-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.243] [命中缓存]: from:archive-index root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.284] [命中缓存]: from:index root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.304] [命中缓存]: from:search-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.328] info - Generating static pages (6/26) [10:35:44.339] [命中缓存]: from:tag-index-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.357] [命中缓存]: from:page-2 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.377] [命中缓存]: from:search-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.381] 全文搜索缓存 page_block_929f95ac-1b4b-4bdd-8b5f-15737e3f4e53 false [10:35:44.381] 全文搜索缓存 page_block_05ad4509-5d29-46fc-8227-b6682119ca74 false [10:35:44.381] 全文搜索缓存 page_block_bc50e4e4-9e66-4a87-8565-e1ceaeeecbc1 false [10:35:44.382] 全文搜索缓存 page_block_23dda417-50a9-4407-81d4-4eb3ec2cbb05 false [10:35:44.382] 全文搜索缓存 page_block_81be04fa-cabd-4540-bc0a-c84855ea78d1 false [10:35:44.383] 全文搜索缓存 page_block_66666e4c-a312-4b90-9572-432962b948b8 false [10:35:44.383] 全文搜索缓存 page_block_cdbaca14-a35e-43a0-a3ce-f53809175aa1 false [10:35:44.383] 全文搜索缓存 page_block_eb45b915-777c-42d7-883d-116b4be4a7b8 false [10:35:44.384] info - Generating static pages (12/26) [10:35:44.387] [命中缓存]: from:tag-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.411] [命中缓存]: from:slug-props-1657288103102 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.413] [请求API] from:slug id:929f95ac-1b4b-4bdd-8b5f-15737e3f4e53 [10:35:44.414] [命中缓存]: from:tag-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.441] [命中缓存]: from:slug-props-1657283975463 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.443] [请求API] from:slug id:05ad4509-5d29-46fc-8227-b6682119ca74 [10:35:44.450] [命中缓存]: from:slug-props-1657267170259 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.452] [请求API] from:slug id:bc50e4e4-9e66-4a87-8565-e1ceaeeecbc1 [10:35:44.573] [响应成功]: from:slug id:05ad4509-5d29-46fc-8227-b6682119ca74 [10:35:44.573] [API耗时] 131ms [10:35:44.609] [响应成功]: from:slug id:bc50e4e4-9e66-4a87-8565-e1ceaeeecbc1 [10:35:44.610] [API耗时] 157ms [10:35:44.620] [命中缓存]: from:slug-props-1653388290768 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.623] [请求API] from:slug id:23dda417-50a9-4407-81d4-4eb3ec2cbb05 [10:35:44.666] [命中缓存]: from:slug-props-1653388232180 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:44.668] [请求API] from:slug id:81be04fa-cabd-4540-bc0a-c84855ea78d1 [10:35:44.891] [响应成功]: from:slug id:929f95ac-1b4b-4bdd-8b5f-15737e3f4e53 [10:35:44.892] [API耗时] 478ms [10:35:44.960] "p" missing block 5bf0b843-8cad-495e-9482-25ac58951479 [10:35:45.015] [响应成功]: from:slug id:23dda417-50a9-4407-81d4-4eb3ec2cbb05 [10:35:45.016] [API耗时] 392ms [10:35:45.033] Warning: data for page "/article/[slug]" is 1.94 MB which exceeds the threshold of 128 kB, this amount of data can reduce performance. [10:35:45.033] See more info here: https://nextjs.org/docs/messages/large-page-data [10:35:45.088] Warning: data for page "/article/[slug]" is 266 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance. [10:35:45.089] See more info here: https://nextjs.org/docs/messages/large-page-data [10:35:45.122] info - Generating static pages (19/26) [10:35:45.125] [命中缓存]: from:slug-props-1653388127333 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:45.127] [请求API] from:slug id:66666e4c-a312-4b90-9572-432962b948b8 [10:35:45.142] [命中缓存]: from:slug-props-1653550066799 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:45.144] [请求API] from:slug id:cdbaca14-a35e-43a0-a3ce-f53809175aa1 [10:35:45.361] [响应成功]: from:slug id:cdbaca14-a35e-43a0-a3ce-f53809175aa1 [10:35:45.361] [API耗时] 216ms [10:35:45.403] [响应成功]: from:slug id:66666e4c-a312-4b90-9572-432962b948b8 [10:35:45.403] [API耗时] 276ms [10:35:45.433] Warning: data for page "/article/[slug]" is 218 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance. [10:35:45.433] See more info here: https://nextjs.org/docs/messages/large-page-data [10:35:45.467] [命中缓存]: from:slug-props-1653388376680 root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:45.469] [请求API] from:slug id:eb45b915-777c-42d7-883d-116b4be4a7b8 [10:35:45.476] Warning: data for page "/article/[slug]" is 307 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance. [10:35:45.476] See more info here: https://nextjs.org/docs/messages/large-page-data [10:35:45.501] [命中缓存]: from:category-props root-page-id:15d115babab049e7b3978a3b04aa9daf [10:35:45.741] [响应成功]: from:slug id:eb45b915-777c-42d7-883d-116b4be4a7b8 [10:35:45.741] [API耗时] 273ms [10:35:45.786] Warning: data for page "/article/[slug]" is 262 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance. [10:35:45.787] See more info here: https://nextjs.org/docs/messages/large-page-data [10:35:49.617] [响应成功]: from:slug id:81be04fa-cabd-4540-bc0a-c84855ea78d1 [10:35:49.617] [API耗时] 4949ms [10:35:49.652] info - Generating static pages (26/26) [10:35:50.167] info - Finalizing page optimization... [10:35:50.186] [10:35:50.202] Page Size First Load JS [10:35:50.202] ┌ ● / (ISR: 5 Seconds) 317 B 308 kB [10:35:50.202] ├ /_app 0 B 307 kB [10:35:50.202] ├ ● /[slug] 858 B 308 kB [10:35:50.202] ├ ○ /404 (322 ms) 446 B 308 kB [10:35:50.203] ├ ● /archive (ISR: 1 Seconds) (381 ms) 466 B 308 kB [10:35:50.203] ├ ● /article/[slug] (ISR: 1 Seconds) (7680 ms) 831 B 308 kB [10:35:50.203] ├ ├ /article/1653388232180 (4988 ms) [10:35:50.203] ├ ├ /article/1657288103102 (735 ms) [10:35:50.203] ├ ├ /article/1653388290768 (503 ms) [10:35:50.203] ├ ├ /article/1653388127333 (377 ms) [10:35:50.204] ├ ├ /article/1653388376680 (342 ms) [10:35:50.204] ├ ├ /article/1653550066799 (324 ms) [10:35:50.205] ├ ├ /article/1657283975463 [10:35:50.205] ├ └ /article/1657267170259 [10:35:50.205] ├ ● /category (ISR: 1 Seconds) 481 B 308 kB [10:35:50.205] ├ ● /category/[category] (ISR: 1 Seconds) 516 B 308 kB [10:35:50.205] ├ └ /category/测试 [10:35:50.205] ├ λ /feed 249 B 308 kB [10:35:50.205] ├ ● /page/[page] (ISR: 1 Seconds) 464 B 308 kB [10:35:50.206] ├ └ /page/2 [10:35:50.206] ├ ● /search (ISR: 1 Seconds) 622 B 308 kB [10:35:50.206] ├ ● /search/[keyword] (ISR: 1 Seconds) 490 B 308 kB [10:35:50.206] ├ └ /search/NotionNext BLOG [10:35:50.206] ├ ● /tag (ISR: 1 Seconds) 463 B 308 kB [10:35:50.206] └ ● /tag/[tag] (ISR: 1 Seconds) 491 B 308 kB [10:35:50.207] ├ /tag/标注的标签1 [10:35:50.207] └ /tag/简悦 [10:35:50.207] + First Load JS shared by all 307 kB [10:35:50.207] ├ chunks/framework-97d5d6e713538c3d.js 39.8 kB [10:35:50.207] ├ chunks/main-0452bdfd17dd2f71.js 38.7 kB [10:35:50.207] ├ chunks/pages/_app-337e01874adf87e5.js 226 kB [10:35:50.208] ├ chunks/webpack-39bfc00277fda64c.js 2.42 kB [10:35:50.208] └ css/9599c9e844f1aff0.css 29 kB [10:35:50.208] [10:35:50.208] λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) [10:35:50.208] ○ (Static) automatically rendered as static HTML (uses no initial props) [10:35:50.208] ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps) [10:35:50.209] (ISR) incremental static regeneration (uses revalidate in getStaticProps) [10:35:50.209] [10:35:50.209] Next.js Analytics is enabled for this production build. You'll receive a Real Experience Score computed by all of your visitors. [10:35:50.209] [10:35:50.400] Loaded env from /vercel/path0/.env.local [10:35:50.433] Done in 77.08s. [10:35:50.989] Traced Next.js server files in: 498.116ms [10:35:52.647] Created all serverless functions in: 1.658s [10:35:52.672] Collected static files (public/, static/, .next/static): 20.894ms [10:36:00.276] Generated build outputs: [10:36:00.277] - Static files: 117 [10:36:00.277] - Serverless Functions: 49 [10:36:00.277] - Edge Functions: 0 [10:36:00.277] Serverless regions: Washington, D.C., USA [10:36:00.277] Deployed outputs in 5s [10:36:01.279] Build completed. Populating build cache... [10:36:23.891] Uploading build cache [79.85 MB]... [10:36:25.584] Build cache uploaded: 1.693s [10:36:25.623] Done with "package.json"

trylang commented 2 years ago

noion.so我已经弄好了,但是看到notion-next博客很好看,就也想弄一个,结果给自己找了一个头大的问题。这个问题不是很着急,大佬们有空了再帮忙看一下就行。谢谢啦

Joel2561 commented 2 years ago

@trylang 你好,今天看了看你的Notion页面以及你的Build log,似乎和你的页面Icon设置有关系, Build log里有一条: 请不要使用emoji作为站点图标 📒。 你可以尝试重新设置下你的Notion页面。

cmengting commented 2 years ago

@trylang 你好,今天看了看你的Notion页面以及你的Build log,似乎和你的页面Icon设置有关系, Build log里有一条: 请不要使用emoji作为站点图标 📒。 你可以尝试重新设置下你的Notion页面。

我跟trylang几乎是一样的问题,之前vercel构建成功网页也没有任何问题。八九天之前发现网页无响应了。站点图标只要去掉notion页面上的icon就不会报这个错误log。但是无响应仍然没有解决。

Joel2561 commented 2 years ago

@cmengting 看来这确实是个比较影响使用的问题。我的建议还是先到notionnext那边回报这个问题,提供网站地址,vercel的相关log等作者回复。 我今天帮助其他人搭notionnext博客的时候也出现了这个问题,我重新删除仓库后重新构建问题解决了,但时间仓促没来得及排查是哪里的问题。所以如果你有时间最好还是联系notionnext作者处理这个问题。 另外可以检查下GitHub上是不是已经拉取到了最新的仓库。

cmengting commented 2 years ago

@cmengting 看来这确实是个比较影响使用的问题。我的建议还是先到notionnext那边回报这个问题,提供网站地址,vercel的相关log等作者回复。 我今天帮助其他人搭notionnext博客的时候也出现了这个问题,我重新删除仓库后重新构建问题解决了,但时间仓促没来得及排查是哪里的问题。所以如果你有时间最好还是联系notionnext作者处理这个问题。 另外可以检查下GitHub上是不是已经拉取到了最新的仓库。

感谢你的回复。确实需要最新的仓库,作者的一个commit解决了我的问题:https://github.com/tangly1024/NotionNext/commit/6e3904ff60cb468511d0760da1063ef85bd3b071 @trylang 你也可以试试看