Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] npm run build 的时候卡住了 #6245

Closed
cangku opened this issue Feb 17, 2025 · 4 comments
Closed

[Bug] npm run build 的时候卡住了 #6245

cangku opened this issue Feb 17, 2025 · 4 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@cangku
Copy link

cangku commented Feb 17, 2025

📦 部署环境

Docker

📦 部署模式

客户端模式(lobe-chat 镜像)

📌 软件版本

1.57.1

💻 系统环境

macOS, Other Linux

🌐 浏览器

Chrome

🐛 问题描述

NODE_OPTIONS="--max-old-space-size=12288" npm run build

@lobehub/[email protected] build
next build

▲ Next.js 15.1.7

  • Experiments (use with caution):
    · webpackMemoryOptimizations

Creating an optimized production build ...
○ (serwist) The service worker will not be automatically registered, please call 'window.serwist.register()' in 'componentDidMount' or 'useEffect'.
✓ (serwist) Bundling the service worker script with the URL '/sw.js' and the scope '/'...

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@cangku cangku added the 🐛 Bug Something isn't working | 缺陷 label Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 17, 2025
@lobehubbot
Copy link
Member

👀 @cangku

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@arvinxx
Copy link
Contributor

arvinxx commented Feb 17, 2025

可能内存不够大?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Maybe the memory is not large enough?

Copy link

dosubot bot commented Feb 17, 2025

@cangku 你好!我是Dosu,我是一个可以帮助你解决 bug、回答问题,并且成为贡献者的机器人。我会在等待人类维护者的过程中为你提供帮助。

I found a similar closed issue that might be relevant to your problem. In that issue, it was suggested to increase the memory allocation by modifying the build command to node --max-old-space-size=4096 next build. Additionally, ensure that any undefined variables, such as $NIXPACKS_PATH, are defined in your Dockerfile or environment. Another suggestion was to set NIXPACKS_BUILD_CMD="NODE_OPTIONS='--max-old-space-size=8192' pnpm run build". These approaches might help resolve the "JavaScript heap out of memory" error you are encountering [1].

In your case, you are already using NODE_OPTIONS="--max-old-space-size=12288", which should be sufficient. However, if the build is still getting stuck, you might want to check other configurations in your Docker setup or consider reducing the memory allocation slightly to see if it affects the build process. Additionally, ensure that your Docker environment has enough resources allocated to handle the build process.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@lobehub lobehub locked and limited conversation to collaborators Feb 17, 2025
@arvinxx arvinxx converted this issue into discussion #6246 Feb 17, 2025
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Feb 17, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Done
Development

No branches or pull requests

3 participants