File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ export default defineConfig({
7070 { text : 'Vercel 静态导出' , link : '/user-guide/deploy/vercel-static' } ,
7171 { text : 'Cloudflare 文档站' , link : '/user-guide/deploy/cloudflare-pages-docs' } ,
7272 { text : 'Cloudflare 博客静态' , link : '/user-guide/deploy/cloudflare-pages' } ,
73+ { text : 'EdgeOne Pages' , link : '/user-guide/deploy/edgeone-pages' } ,
7374 { text : '构建性能调优' , link : '/user-guide/deploy/build-tuning' } ,
7475 { text : 'Netlify' , link : '/user-guide/deploy/netlify' } ,
7576 { text : 'VPS' , link : '/user-guide/deploy/vps' }
Original file line number Diff line number Diff line change 1+ # 腾讯云 EdgeOne Pages 部署
2+
3+ > 完整排错见仓库 [ DEPLOYMENT.md · EdgeOne Pages] ( https://github.com/notionnext-org/NotionNext/blob/main/DEPLOYMENT.md#腾讯云-edgeone-pages )
4+
5+ ## 环境要求
6+
7+ | 项 | 说明 |
8+ | --- | --- |
9+ | Node | 与仓库根目录 ** ` .nvmrc ` 完全一致** (当前为 ` 20.18.0 ` ) |
10+ | 包管理 | ` yarn install ` → ` yarn build ` 或 ` yarn export ` |
11+ | 必配变量 | ` NOTION_PAGE_ID ` 等(见 [ 配置站点] ( ../config-site.md ) ) |
12+
13+ EdgeOne 会按 ` .nvmrc ` 切换 Node。若日志出现 ** ` Failed to switch to Node.js 20.20.0 ` ** 等,说明仓库过旧或控制台所选版本与 ` .nvmrc ` 不一致——请拉取最新 ` main ` ,并在 ** 项目设置 → Node.js 版本** 中选择与 ` .nvmrc ` 相同的补丁号(如 ` 20.18.0 ` )。
14+
15+ ## 推荐:框架预设「Next SSG」
16+
17+ 部分用户在默认 Pages 构建流程下,Node 切换成功后会在 ` yarn install ` 阶段遇到 ** ` ENOSPC: no space left on device ` ** (构建机 ` /dev/shm ` 或磁盘不足)。
18+
19+ 若出现该情况,可在 EdgeOne 控制台尝试将** 框架预设** 改为 ** Next SSG** (或平台提供的 Next 静态导出类预设)后重新部署。该方式通常由平台优化安装与构建路径,占用更小,社区反馈可成功完成部署。
20+
21+ 仍失败时请结合下方 ENOSPC 小节与 [ 构建性能调优] ( ./build-tuning.md ) 。
22+
23+ ## ` yarn install ` 报 ENOSPC
24+
25+ 日志中若已有 ** ` Now, we're on node version v20.18.0 ` ** ,则 Node 版本已正常,失败原因是** 构建机空间不足** ,与 NotionNext 代码无关。
26+
27+ 可尝试(按顺序):
28+
29+ 1 . 改用上文 ** Next SSG** 预设,或关闭「依赖/构建缓存」后无缓存重构建一次
30+ 2 . 向 EdgeOne / 腾讯云工单说明 ` yarn install ` 阶段 ENOSPC,询问构建盘配额
31+ 3 . 若平台支持,设置 ` YARN_CACHE_FOLDER ` 到空间更大的路径(以官方文档为准)
32+ 4 . 在 GitHub Actions 等环境完成 ` yarn build ` / ` yarn export ` ,仅将静态产物同步到 EdgeOne 托管
33+
34+ ## 构建超时
35+
36+ Notion 拉取慢导致单页超时,请参阅 ** [ 构建性能调优] ( ./build-tuning.md ) ** ,例如:
37+
38+ ``` env
39+ BUILD_PREFETCH_ENABLED=false
40+ STATIC_PAGE_GENERATION_TIMEOUT=600
41+ ```
42+
43+ ## 相关 Issue
44+
45+ - [ #4014 ] ( https://github.com/notionnext-org/NotionNext/issues/4014 ) — EdgeOne Node 版本与 ENOSPC 排错(已在 ` main ` 将 ` .nvmrc ` 对齐 ` 20.18.0 ` )
Original file line number Diff line number Diff line change 1919| [ vercel-redeploy.md] ( ./vercel-redeploy.md ) | 重新部署 |
2020| [ netlify.md] ( ./netlify.md ) | Netlify(4.0.9+) |
2121| [ cloudflare-pages.md] ( ./cloudflare-pages.md ) | Cloudflare 静态 |
22+ | [ edgeone-pages.md] ( ./edgeone-pages.md ) | ** 腾讯云 EdgeOne** (Node 版本、ENOSPC、Next SSG 预设) |
2223| [ build-tuning.md] ( ./build-tuning.md ) | ** 构建超时 / Notion 预热与限流** (环境变量) |
2324| [ vps.md] ( ./vps.md ) | VPS / Docker(Node 20+) |
2425
3233- ** Yarn** :` yarn ` → ` yarn build ` / ` yarn export `
3334- 必配:` NOTION_PAGE_ID `
3435
35- ## EdgeOne / 构建缓存
36+ ## EdgeOne
3637
37- 构建时若 ` .next/cache ` 不可写,项目会回退系统临时目录(Netlify 等)。见上游 PR # 4046 与 ` lib/cache/build_session.js ` 。
38+ Node 版本、磁盘 ` ENOSPC ` 、框架预设 ** Next SSG ** 等见 ** [ edgeone-pages.md ] ( ./edgeone-pages.md ) ** 。 构建时若 ` .next/cache ` 不可写,项目会回退系统临时目录,见 ` lib/cache/build_session.js ` 。
You can’t perform that action at this time.
0 commit comments