[Bug] Netlify部署提示内存不足 #2742
-
📦 部署环境
📌 软件版本Opera One(版本: 112.0.5179.0) 💻 系统环境
🌐 浏览器
🐛 问题描述部署到构建阶段报错,问ai说是内存不足 AI的解答:⬇️『### 我在自己的fork更改后确实有用』 _“诊断: 在第 106 行出现错误 “JavaScript 堆已用完内存”,导致构建失败。该错误发生在尝试分配内存的构建阶段。 解决方法 要解决 “JavaScript 堆超出内存 ”问题,您需要在构建过程中增加 Node.js 的可用内存。您可以设置 max-old-space-size 标志来分配更多内存。如下所示,修改 netlify.toml 文件中的构建命令以包含此标记: 编译 报错代码:⬇️ 3:23:49 AM: @netlify/plugin-nextjs (onEnd event) 📷 复现步骤Initializing Building『这里出错』 Deploying Cleanup Post-processing 🚦 期望结果快速部署 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
👀 @S45618 Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
另外,请支持cloudlflare page部署,部署了一下,发现报错⬇️ 01:50:20.868 | Cloning repository... -- | -- 01:50:22.040 | From https://github.com/S45618/lobe-chat-auto 01:50:22.040 | * branch 36ce76100e7aab528b21089595363444f7478ef6 -> FETCH_HEAD 01:50:22.040 | 01:50:22.186 | HEAD is now at 36ce761 :bookmark: chore(release): v0.162.11 [skip ci] 01:50:22.186 | 01:50:22.270 | 01:50:22.270 | Using v2 root directory strategy 01:50:22.299 | Success: Finished cloning repository files 01:50:23.977 | Checking for configuration in a wrangler.toml configuration file (BETA) 01:50:23.977 | 01:50:24.072 | No wrangler.toml file found. Continuing. 01:50:27.408 | Detected the following tools from environment: [email protected], nodejs@lts/hydrogen 01:50:27.409 | 01:50:27.409 | Installing nodejs lts/hydrogen 01:50:27.409 | 01:50:27.482 | mkdir: cannot create directory '/opt/buildhome/.asdf/installs/nodejs/lts/hydrogen': No such file or directory 01:50:27.912 | Trying to update node-build... ok 01:50:27.947 | node-build: definition not found: 18 01:50:27.955 | Error: Exit with error code: 1 01:50:27.956 | at ChildProcess. (/snapshot/dist/run-build.js) 01:50:27.956 | at Object.onceWrapper (node:events:652:26) 01:50:27.956 | at ChildProcess.emit (node:events:537:28) 01:50:27.956 | at ChildProcess._handle.onexit (node:internal/child_process:291:12) 01:50:27.967 | Failed: build command exited with code: 1 01:50:28.770 | Failed: error occurred while running build command |
Beta Was this translation helpful? Give feedback.
-
Netlify 构建内存不足,请尝试将下面配置项的值改为 Line 2 in 2ee8344 CF Page 构建前,请删除根目录的 |
Beta Was this translation helpful? Give feedback.
-
The Netlify build has insufficient memory. Please try changing the value of the following configuration item to Line 2 in 2ee8344 Before building CF Page, please delete the |
Beta Was this translation helpful? Give feedback.
-
感谢解答👍 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer 👍 |
Beta Was this translation helpful? Give feedback.
Netlify 构建内存不足,请尝试将下面配置项的值改为
node --max-old-space-size=4096 next build
再试试。lobe-chat/netlify.toml
Line 2 in 2ee8344
CF Page 构建前,请删除根目录的
.nvmrc
文件。此外由于 CF 免费计划对单文件大小限制在 25MB,所以本项目即使成功构建,也无法被部署。