RocketChat / RocketChat/EmbeddedChat
Windows builds fail intermittently due to Rollup Terser worker crashes and OOM
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 165
- Forks
- 381
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
Description
On Windows, monorepo/workspace builds intermittently fail during Rollup minification with errors such as:
Call retries were exceededspawn UNKNOWNJavaScript heap out of memory
This instability affects package builds (notably @embeddedchat/markups, @embeddedchat/react, @embeddedchat/ui-elements, and @embeddedchat/ui-kit) and blocks reliable local builds and CI on Windows.
Steps to reproduce
- Use Windows 10/11
- Node.js
v16.19.0 - Yarn
v3.6.4 - Run one of the following:
yarn workspace @embeddedchat/markups buildyarn workspace @embeddedchat/react build- or
yarn buildat repo root
- Observe intermittent Rollup failures during minification
Expected behavior
Workspace and monorepo builds should complete consistently on Windows without worker crashes or memory-related failures.
Actual behavior
Builds intermittently fail during Rollup minification with worker process crashes and OOM errors, even when no code changes are made.
Root cause
rollup-plugin-terser defaults to spawning multiple worker processes.
For large bundles in this monorepo, this creates excessive process and memory pressure on Windows, leading to instability.
Additionally, direct source imports (e.g. @embeddedchat/markups/src) cause Storybook parsing failures in some environments.
Proposed fix
- Throttle Terser workers in Rollup configs:
terser({ numWorkers: 1 })
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the affected workspace builds on Windows with Node.js v16.19.0 and Yarn v3.6.4, then inspect the Rollup configurations used by @embeddedchat/markups, @embeddedchat/react, @embeddedchat/ui-elements, and @embeddedchat/ui-kit. Verify whether minification worker limits address the crashes and check the direct @embeddedchat/markups/src import case in Storybook. Done means the listed builds complete consistently without worker or OOM failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, react, rollup
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100