The current Dockerfile fails during frontend build with "JavaScript heap out of memory" error when Node.js runs out of heap memory during the Vite build process.
Solution
Added NODE_OPTIONS='--max-old-space-size=6144' to the npm build command to allocate 6GB of heap memory for Node.js, resolving the memory allocation issue.
Changes
Modified RUN npm run build to RUN NODE_OPTIONS='--max-old-space-size=6144' npm run build in Dockerfile line ~39
Testing
✅ Build completes successfully without memory errors
✅ No functional changes to application behavior
✅ Same approach successfully used in previous versions
Impact
Fixes build failures for users experiencing memory issues
Enables successful Docker builds on systems with limited memory
No breaking changes or performance impact on runtime
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/14580
**Author:** [@comeback01](https://github.com/comeback01)
**Created:** 6/1/2025
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `main`
---
### 📝 Commits (1)
- [`de3ebde`](https://github.com/open-webui/open-webui/commit/de3ebde6c70301a9852a2ef977f24045697221ee) Update Dockerfile
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `Dockerfile` (+1 -1)
</details>
### 📄 Description
## Problem
The current Dockerfile fails during frontend build with "JavaScript heap out of memory" error when Node.js runs out of heap memory during the Vite build process.
## Solution
Added `NODE_OPTIONS='--max-old-space-size=6144'` to the npm build command to allocate 6GB of heap memory for Node.js, resolving the memory allocation issue.
## Changes
- Modified `RUN npm run build` to `RUN NODE_OPTIONS='--max-old-space-size=6144' npm run build` in Dockerfile line ~39
## Testing
- ✅ Build completes successfully without memory errors
- ✅ No functional changes to application behavior
- ✅ Same approach successfully used in previous versions
## Impact
- Fixes build failures for users experiencing memory issues
- Enables successful Docker builds on systems with limited memory
- No breaking changes or performance impact on runtime
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14580
Author: @comeback01
Created: 6/1/2025
Status: ❌ Closed
Base:
main← Head:main📝 Commits (1)
de3ebdeUpdate Dockerfile📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
Dockerfile(+1 -1)📄 Description
Problem
The current Dockerfile fails during frontend build with "JavaScript heap out of memory" error when Node.js runs out of heap memory during the Vite build process.
Solution
Added
NODE_OPTIONS='--max-old-space-size=6144'to the npm build command to allocate 6GB of heap memory for Node.js, resolving the memory allocation issue.Changes
RUN npm run buildtoRUN NODE_OPTIONS='--max-old-space-size=6144' npm run buildin Dockerfile line ~39Testing
Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.