使用webpack捆绑项目时出现以下错误.当我只有几个块(分裂)点(require.ensure)时,它运行正常,但当我增加分裂点后出现错误.
<--- Last few GCs ---> 124541 ms: Mark-sweep 1379.0 (1457.1) -> 1378.9 (1457.1) MB, 891.6 / 0 ms [allocation failure] [GC in old space requested]. 125398 ms: Mark-sweep 1378.9 (1457.1) -> 1378.9 (1457.1) MB, 857.0 / 0 ms [allocation failure] [GC in old space requested]. 126289 ms: Mark-sweep 1378.9 (1457.1) -> 1378.9 (1457.1) MB, 890.5 / 0 ms [last resort gc]. 127136 ms: Mark-sweep 1378.9 (1457.1) -> 1378.9 (1457.1) MB, 847.1 / 0 ms [last resort gc]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 0x18342c2373391: get [/path/node_modules/babel-traverse/lib/path/index.js:~75] [pc=0x126413012f98] (this=0x30cb87230cc1 ,_ref2=0x2b8f0305a311 ) 2: node [/path/node_modules/babel-traverse/lib/index.js:~119] [pc=0x126412dd40f5] (... FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory Abort trap: 6
Abhinav Sing.. 11
这在我增加节点大小时起作用,默认情况下大约为1GB(不确定)
通过增加内存来运行节点--max_old_space_size=4092
,它可以工作
资料来源:https: //github.com/webpack/webpack/issues/1875#issuecomment-170663572
这在我增加节点大小时起作用,默认情况下大约为1GB(不确定)
通过增加内存来运行节点--max_old_space_size=4092
,它可以工作
资料来源:https: //github.com/webpack/webpack/issues/1875#issuecomment-170663572