ardatan / ardatan/meteor-webpack
Javascript heap out of memory error
- Dominant language
- JavaScript
- Stars
- 123
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Hey, I am getting the following error when trying to use HMR on my current bundle:
```
I20190803-12:24:37.784(-7)? <--- Last few GCs --->
I20190803-12:24:37.785(-7)?
I20190803-12:24:37.785(-7)? [13338:0x103000000] 277033 ms: Mark-sweep 1108.0 (1434.0) -> 1107.3 (1435.5) MB, 735.8 / 0.1 ms allocation failure GC in old space requested
I20190803-12:24:37.785(-7)? [13338:0x103000000] 277790 ms: Mark-sweep 1107.3 (1435.5) -> 1106.7 (1380.5) MB, 756.9 / 0.0 ms last resort GC in old space requested
I20190803-12:24:37.785(-7)? [13338:0x103000000] 278537 ms: Mark-sweep 1106.7 (1380.5) -> 1106.7 (1362.0) MB, 747.0 / 0.0 ms last resort GC in old space requested
I20190803-12:24:37.785(-7)?
I20190803-12:24:37.786(-7)?
I20190803-12:24:37.786(-7)? <--- JS stacktrace --->
I20190803-12:24:37.786(-7)?
I20190803-12:24:37.786(-7)? ==== JS stack trace =========================================
I20190803-12:24:37.786(-7)?
I20190803-12:24:37.786(-7)? Security context: 0x389b5caa58b9
I20190803-12:24:37.787(-7)? 1: stringSlice(aka stringSlice) [buffer.js:560] [bytecode=0x389bfcccb989 offset=94](this=0x389b7ae822d1 ,buf=0x389bbb5bf7c9 ,encoding=0x389b5cab5b89 ,start=0,end=45220306)
I20190803-12:24:37.787(-7)? 2: toString [buffer.js:~609] [pc=0x16fea1251e2](this=0x389bbb5bf7c9 ,encoding=0x389b5cab5b89 ,start=0x389b7...
I20190803-12:24:37.787(-7)?
W20190803-12:24:37.792(-7)? (STDERR) FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
```
I have experience with this error and usually fix it by setting the environment variables `TOOL_NODE_FLAGS` and `NODE_OPTIONS`, but it appears that neither of them gets properly passed through to the webpack node instance.
Is there any way to properly pass through those environment variables?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the webpack node instance is launched and how TOOL_NODE_FLAGS and NODE_OPTIONS are handled; reproduce the HMR bundle with those variables set. Done means both variables reach that process and the reported JavaScript heap out-of-memory failure is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100