Skip to content

fix: increase Node.js heap size to prevent webpack OOM during dev build#699

Open
hugo8892 wants to merge 1 commit into
Autonomy-Logic:developmentfrom
hugo8892:development
Open

fix: increase Node.js heap size to prevent webpack OOM during dev build#699
hugo8892 wants to merge 1 commit into
Autonomy-Logic:developmentfrom
hugo8892:development

Conversation

@hugo8892
Copy link
Copy Markdown

@hugo8892 hugo8892 commented Mar 24, 2026

Summary

  • Adds node-options = --max-old-space-size=4096 to .npmrc to prevent webpack from crashing with out-of-memory during development builds
  • The renderer webpack process was hitting the default Node.js heap limit (~2GB) and crashing with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Test plan

  • Run npm run start:dev and verify the app starts without OOM crash
  • Confirm webpack renderer bundle completes successfully

Summary by CodeRabbit

  • Chores
    • Improved Node.js memory configuration for npm operations to enhance build stability and performance.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 24, 2026

Walkthrough

The .npmrc file was modified to add a Node.js memory configuration option (node-options = --max-old-space-size=4096), enabling increased heap size for npm-invoked Node processes while preserving existing engine-strict enforcement.

Changes

Cohort / File(s) Summary
Configuration Update
.npmrc
Added Node.js runtime memory option to increase heap size allocation for npm processes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A little hop, a memory leap,
Four gigs of space, our builds run deep,
No more crashes from heaps so tight,
Our processes now dance through the night!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides context and a test plan but does not follow the required template structure with References, DOD checklist, or other mandatory sections. Update the description to include all required template sections: issue references, Jira links, and a complete DOD checklist with marked items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: increasing Node.js heap size to fix webpack OOM issues during development builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.npmrc (1)

2-2: Consider documenting the increased memory requirement.

The 4GB heap size assumes developers have at least 4GB of available RAM. Consider adding this to the README or CONTRIBUTING guide as a system requirement to help new contributors prepare their development environment.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.npmrc at line 2, The .npmrc sets node-options = --max-old-space-size=4096
which raises the Node heap to 4GB; add a short note to the project's README or
CONTRIBUTING guide stating that local development requires at least 4GB of
available RAM (or adjust system requirements wording) so contributors are aware
of the increased memory requirement and any recommended steps (e.g., closing
other apps or using swap) before running npm scripts that rely on this setting.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.npmrc:
- Line 2: The .npmrc sets node-options = --max-old-space-size=4096 which raises
the Node heap to 4GB; add a short note to the project's README or CONTRIBUTING
guide stating that local development requires at least 4GB of available RAM (or
adjust system requirements wording) so contributors are aware of the increased
memory requirement and any recommended steps (e.g., closing other apps or using
swap) before running npm scripts that rely on this setting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0a93e471-aa8d-4e33-b7d8-035bcbe0d359

📥 Commits

Reviewing files that changed from the base of the PR and between 8817969 and b885821.

📒 Files selected for processing (1)
  • .npmrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant