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.79k stars 10.72k forks source link

【部署异常】Vercel部署后访问白屏,Error: Cannot find module './start' #2893

Open ArkYuki opened 1 week ago

ArkYuki commented 1 week ago

描述遇到的问题

Vercel部署报错Error: Cannot find module './start'。最近数次sync fork均报错,仅初次部署成功 但是进入网会直接白屏无内容

相应配置

Page ID 11219e97798480728d00ef350fb0ae3a https://wiki-next.reitouko.cyou

截图

Screenshot_2024-10-27-18-45-55-311_com android chrome

Build log

[18:39:35.151] Running build in Washington, D.C., USA (East) – iad1
[18:39:35.257] Cloning github.com/ArkYuki/wiki-notion-next (Branch: reitouko, Commit: 1b9073f)
[18:39:36.620] Cloning completed: 1.360s
[18:39:41.293] Restored build cache from previous deployment (BQsQ1yZJEQHVZg2KpYfcggb4ksVZ)
[18:39:41.474] Running "vercel build"
[18:39:44.175] Vercel CLI 37.12.0
[18:39:46.283] Installing dependencies...
[18:39:46.566] yarn install v1.22.19
[18:39:46.646] [1/4] Resolving packages...
[18:39:47.303] [2/4] Fetching packages...
[18:40:12.191] [3/4] Linking dependencies...
[18:40:12.196] warning "react-facebook > react-spinner-children@1.0.8" has incorrect peer dependency "react@15.x || 16.x".
[18:40:12.197] warning "react-notion-x > react-image@4.1.0" has unmet peer dependency "@babel/runtime@>=7".
[18:40:12.198] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react@^15 || ^16".
[18:40:12.198] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react-dom@^15 || ^16".
[18:40:12.199] warning "react-notion-x > react-lazy-images > react-intersection-observer@6.4.2" has incorrect peer dependency "react@^15.0.0 || ^16.0.0 || ^17.0.0".
[18:40:12.199] warning "react-notion-x > react-pdf > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[18:40:12.200] warning " > @typescript-eslint/eslint-plugin@7.16.0" has incorrect peer dependency "eslint@^8.56.0".
[18:40:12.200] warning "@typescript-eslint/eslint-plugin > @typescript-eslint/type-utils@7.16.0" has incorrect peer dependency "eslint@^8.56.0".
[18:40:12.201] warning "@typescript-eslint/eslint-plugin > @typescript-eslint/utils@7.16.0" has incorrect peer dependency "eslint@^8.56.0".
[18:40:12.203] warning " > @typescript-eslint/parser@7.16.0" has incorrect peer dependency "eslint@^8.56.0".
[18:40:12.204] warning " > eslint-config-next@13.5.6" has incorrect peer dependency "eslint@^7.23.0 || ^8.0.0".
[18:40:12.204] warning "eslint-config-next > @typescript-eslint/parser@6.20.0" has incorrect peer dependency "eslint@^7.0.0 || ^8.0.0".
[18:40:12.205] warning " > eslint-plugin-import@2.29.1" has incorrect peer dependency "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8".
[18:40:12.205] warning "eslint-config-next > eslint-plugin-jsx-a11y@6.8.0" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8".
[18:40:12.205] warning "eslint-config-next > eslint-plugin-react@7.33.2" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8".
[18:40:12.207] warning "eslint-config-next > eslint-plugin-react-hooks@4.6.0" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0".
[18:40:12.207] warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
[18:40:12.209] warning " > eslint-plugin-promise@5.2.0" has incorrect peer dependency "eslint@^7.0.0".
[18:40:12.210] warning " > eslint-plugin-react@7.34.3" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8".
[18:40:12.212] warning " > eslint-plugin-react-hooks@4.6.2" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0".
[18:40:23.424] [4/4] Building fresh packages...
[18:40:23.645] success Saved lockfile.
[18:40:23.650] Done in 37.09s.
[18:40:23.682] Detected Next.js version: 14.2.4
[18:40:23.685] Running "yarn run build"
[18:40:23.861] yarn run v1.22.19
[18:40:23.900] $ next build
[18:40:24.618]   ▲ Next.js 14.2.4
[18:40:24.620]   - Environments: .env.local
[18:40:24.620]   - Experiments (use with caution):
[18:40:24.622]     · scrollRestoration
[18:40:24.622] 
[18:40:24.622]    Skipping linting
[18:40:24.622]    Checking validity of types ...
[18:40:43.260]    Creating an optimized production build ...
[18:40:43.738] [默认主题] /vercel/path0/themes/simple
[18:41:01.824] Browserslist: caniuse-lite is outdated. Please run:
[18:41:01.824]   npx update-browserslist-db@latest
[18:41:01.824]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[18:41:20.309]  ✓ Compiled successfully
[18:41:20.311]    Collecting page data ...
[18:41:20.915] [Fetching Data] 11219e97798480728d00ef350fb0ae3a slug-paths
[18:41:20.916] [API-->>请求] from:slug-paths id:11219e97798480728d00ef350fb0ae3a 
[18:41:21.845] [API<<--响应] 耗时:903ms - from:slug-paths
[18:41:21.864] [API-->>请求] from:config-table id:11219e97-7984-81de-9950-e514f66fa993 
[18:41:22.202] [API<<--响应] 耗时:338ms - from:config-table
[18:41:22.205] [API-->>请求] from:data-notice id:11219e97-7984-81ad-9021-f7d2f4eaced5 
[18:41:22.333] [API<<--响应] 耗时:128ms - from:data-notice
[18:41:25.482]    Generating static pages (0/53) ...
[18:41:25.775] missing block undefined
[18:41:25.930] missing block undefined
[18:41:26.021] missing block undefined
[18:41:26.692] [API-->>请求] from:slug-props-article/guide id:11219e97-7984-8172-8732-c0bafda1dd57 
[18:41:26.917] [API<<--响应] 耗时:132ms - from:slug-props-article/guide
[18:41:27.077] 
[18:41:27.078] Error occurred prerendering page "/zh/article/example-1". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:27.078] 
[18:41:27.078] Error: Cannot find module './start'
[18:41:27.078]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:27.078]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:27.254] [API-->>请求] from:slug-props-article/example-2 id:11219e97-7984-8151-8c2c-ec803440c41a 
[18:41:27.254] [API<<--响应] 耗时:153ms - from:slug-props-article/example-2
[18:41:27.368]    Generating static pages (13/53) 

[18:41:27.453] 
[18:41:27.454] Error occurred prerendering page "/zh/article/example-3". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:27.456] 
[18:41:27.456] Error: Cannot find module './start'
[18:41:27.456]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:27.456]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:27.552] [API-->>请求] from:slug-props-article/example-4 id:11219e97-7984-81a2-92de-d49254fb7b6b 
[18:41:27.651] [API<<--响应] 耗时:129ms - from:slug-props-article/example-4
[18:41:27.747] 
[18:41:27.747] Error occurred prerendering page "/zh/article/example-5". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:27.747] 
[18:41:27.747] Error: Cannot find module './start'
[18:41:27.747]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:27.747]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:27.830] [API-->>请求] from:slug-props-article/example-6 id:11219e97-7984-81b0-926e-e845d103163a 
[18:41:27.973] [API<<--响应] 耗时:167ms - from:slug-props-article/example-6
[18:41:28.427] 
[18:41:28.428] Error occurred prerendering page "/zh/article/example-7". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:28.428] 
[18:41:28.428] Error: Cannot find module './start'
[18:41:28.428]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:28.428]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:28.475] [API-->>请求] from:slug-props-article/example-8 id:11219e97-7984-81ab-9c6b-c6baf42d3fb4 
[18:41:28.651] [API<<--响应] 耗时:169ms - from:slug-props-article/example-8
[18:41:28.916] 
[18:41:28.917] Error occurred prerendering page "/zh/article/example-9". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:28.917] 
[18:41:28.917] Error: Cannot find module './start'
[18:41:28.917]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:28.917]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:28.959] [API-->>请求] from:slug-props-article/example-10 id:11219e97-7984-81bf-9d02-eef67de77e89 
[18:41:29.265] [API<<--响应] 耗时:170ms - from:slug-props-article/example-10
[18:41:29.290] 
[18:41:29.291] Error occurred prerendering page "/zh/article/11219e97-7984-813d-b411-e4e9ad36041a". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:29.291] 
[18:41:29.291] Error: Cannot find module './start'
[18:41:29.291]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:29.291]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:29.326] [API-->>请求] from:slug-props-article/invisible id:11219e97-7984-81bd-bad9-e0064776cdaf 
[18:41:29.640] [API<<--响应] 耗时:168ms - from:slug-props-article/invisible
[18:41:29.660] 
[18:41:29.660] Error occurred prerendering page "/zh/%23". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:29.660] 
[18:41:29.660] Error: Cannot find module './start'
[18:41:29.660]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:29.660]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:29.707] [API-->>请求] from:slug-props-index id:11319e97-7984-8067-a507-dbc2cafc93d4 
[18:41:29.922] [API<<--响应] 耗时:146ms - from:slug-props-index
[18:41:29.972] 
[18:41:29.973] Error occurred prerendering page "/zh/links". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:29.973] 
[18:41:29.973] Error: Cannot find module './start'
[18:41:29.973]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:29.973]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:29.974]    Generating static pages (26/53) 

[18:41:30.026] [API-->>请求] from:slug-props-about id:11219e97-7984-8158-9515-fb97a79c23bf 
[18:41:30.256] [API<<--响应] 耗时:148ms - from:slug-props-about
[18:41:30.283] 
[18:41:30.287] Error occurred prerendering page "/zh/category/知行合一". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:30.288] 
[18:41:30.288] Error: Cannot find module './start'
[18:41:30.288]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:30.288]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[18:41:30.801] 
[18:41:30.802] Error occurred prerendering page "/zh/category/心情随笔". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:30.802] 
[18:41:30.802] Error: Cannot find module './start'
[18:41:30.803]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.289] 
[18:41:31.290] Error occurred prerendering page "/zh/search/NotionNext BLOG/page/1". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.290] 
[18:41:31.290] Error: Cannot find module './start'
[18:41:31.291]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.479] 
[18:41:31.480] Error occurred prerendering page "/zh/sign-in/factor-one". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.481] 
[18:41:31.481] Error: Cannot find module './start'
[18:41:31.481]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.612] 
[18:41:31.613] Error occurred prerendering page "/zh/sign-up/sign-up". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.613] 
[18:41:31.613] Error: Cannot find module './start'
[18:41:31.613]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.731] 
[18:41:31.732] Error occurred prerendering page "/zh/tag/文字". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.732] 
[18:41:31.733] Error: Cannot find module './start'
[18:41:31.733]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.781]    Generating static pages (39/53) 
[18:41:31.832] 
[18:41:31.832] Error occurred prerendering page "/zh/tag/开发". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.832] 
[18:41:31.832] Error: Cannot find module './start'
[18:41:31.832]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:31.950] 
[18:41:31.951] Error occurred prerendering page "/zh/tag/健康". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:31.951] 
[18:41:31.951] Error: Cannot find module './start'
[18:41:31.951]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:32.115] 
[18:41:32.116] Error occurred prerendering page "/zh/tag/金钱". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:32.116] 
[18:41:32.116] Error: Cannot find module './start'
[18:41:32.116]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:32.465] 
[18:41:32.465] Error occurred prerendering page "/zh/archive". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:32.466] 
[18:41:32.466] Error: Cannot find module './start'
[18:41:32.466]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:32.650] 
[18:41:32.651] Error occurred prerendering page "/zh/category". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:32.655] 
[18:41:32.656] Error: Cannot find module './start'
[18:41:32.660]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:32.734] [RSS订阅] 生成/rss/feed.xml
[18:41:32.735] [API-->>请求] from:rss-content id:11219e97-7984-814e-abb2-ce9fbd1a6832 
[18:41:32.936] 
[18:41:32.936] Error occurred prerendering page "/zh/search". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:32.936] 
[18:41:32.936] Error: Cannot find module './start'
[18:41:32.937]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:32.940] [API<<--响应] 耗时:173ms - from:rss-content
[18:41:32.940] [API-->>请求] from:rss-content id:11219e97-7984-8154-b0e0-cac9d9bbf054 
[18:41:33.088] 
[18:41:33.092] Error occurred prerendering page "/zh/500". Read more: https://nextjs.org/docs/messages/prerender-error
[18:41:33.092] 
[18:41:33.092] Error: Cannot find module './start'
[18:41:33.092]     at /vercel/path0/.next/server/chunks/43414.js:77:110609
[18:41:33.092]  ✓ Generating static pages (53/53)
[18:41:33.469] 
[18:41:33.472] > Export encountered errors on following paths:
[18:41:33.473]  /[prefix]/[slug]: /zh/article/11219e97-7984-813d-b411-e4e9ad36041a
[18:41:33.473]  /[prefix]/[slug]: /zh/article/example-1
[18:41:33.473]  /[prefix]/[slug]: /zh/article/example-3
[18:41:33.473]  /[prefix]/[slug]: /zh/article/example-5
[18:41:33.473]  /[prefix]/[slug]: /zh/article/example-7
[18:41:33.473]  /[prefix]/[slug]: /zh/article/example-9
[18:41:33.473]  /[prefix]: /zh/%23
[18:41:33.473]  /[prefix]: /zh/links
[18:41:33.473]  /_error: /zh/500
[18:41:33.473]  /archive: /zh/archive
[18:41:33.473]  /category/[category]: /zh/category/心情随笔
[18:41:33.473]  /category/[category]: /zh/category/知行合一
[18:41:33.473]  /category: /zh/category
[18:41:33.473]  /search/[keyword]/page/[page]: /zh/search/NotionNext BLOG/page/1
[18:41:33.473]  /search: /zh/search
[18:41:33.473]  /sign-in/[[...index]]: /zh/sign-in/factor-one
[18:41:33.473]  /sign-up/[[...index]]: /zh/sign-up/sign-up
[18:41:33.473]  /tag/[tag]: /zh/tag/健康
[18:41:33.473]  /tag/[tag]: /zh/tag/开发
[18:41:33.473]  /tag/[tag]: /zh/tag/文字
[18:41:33.473]  /tag/[tag]: /zh/tag/金钱
[18:41:33.542] error Command failed with exit code 1.
[18:41:33.542] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[18:41:33.569] Error: Command "yarn run build" exited with 1
[18:41:33.971] 

环境

Vercel部署,任何浏览器均能实现 版本 latest

tangly1024 commented 1 week ago

报错内容是

[18:41:33.092] Error occurred prerendering page "/zh/500". Read more: https://nextjs.org/docs/messages/prerender-error [18:41:33.092] [18:41:33.092] Error: Cannot find module './start' [18:41:33.092] at /vercel/path0/.next/server/chunks/43414.js:77:110609

实际上项目并没有用到名为start的模块。

判断可能是主题名字配置错了,检查一下notion_config 中是否配置了主题为 start。

需要注意目前没有start主题,只有一个类似的 starter主题。

zsr-lukezhang commented 15 hours ago

image 实测在后面加 ?theme=gitbook 就好了 (甚至没删模板说明之类的) 我也试试GItBook看看