> react-app-rewired build
Creating an optimized production build...
<--- Last few GCs --->
[30:0x55d2c944b180] 119398 ms: Mark-sweep 1350.5 (1449.5) -> 1350.3 (1450.5) MB, 966.8 / 0.0 ms (average mu = 0.090, current mu = 0.000) allocation failure GC in old space requested
[30:0x55d2c944b180] 120325 ms: Mark-sweep 1350.3 (1450.5) -> 1350.3 (1417.0) MB, 927.6 / 0.0 ms (average mu = 0.045, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x24dc4ecdbe1d]
Security context: 0x38a6e559e6e9 <JSObject>
1: push [0x38a6e5585859](this=0x27358e4b27c1 <JSArray[579629]>,0x2b86c4662d79 <SourceNode map = 0x19cdb74dd591>)
2: /* anonymous */(aka /* anonymous */) [0x2917734d89b9] [/app/node_modules/webpack-sources/lib/applySourceMap.js:~58] [pc=0x24dc5035d61a](this=0x1502c5c026f1 <undefined>,chunk=0x10f1bfcffee1 <String[4]: loc(>,middleMapping=0x2b86c4662d41 ...
�[91mFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
�[0m�[91mnpm ERR! code ELIFECYCLE
�[0m�[91mnpm ERR! errno 1
�[0m�[91mnpm ERR! alivia-editor@0.1.0 build: `react-app-rewired build`
npm ERR! Exit status 1
�[0m�[91mnpm ERR!
npm �[0m�[91mERR! Failed at the alivia-editor@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
解决方法:
更改build 命令: "build": "react-app-rewired --max_old_space_size=4096 build",
网友评论