解决vue项目 改东西则项目中断 报错(内存溢出)​`webpack-dev-server --inline --progress --config build/webpack.dev.conf.j

汝繁
2023-12-01

1.当你保存项目时 ctrl+s 则项目中断,其实就是因为内存溢出,不用怕 马上解决

报错信息

<--- Last few GCs --->

[1460:000002761B7142C0]  5105932 ms: Mark-sweep 2056.7 (2262.5) -> 2055.2 (2250.1) MB, 424.9 / 0.1 ms  (average mu = 0.878, current mu = 0.001) last resort GC in old space requested
[1460:000002761B7142C0]  5106363 ms: Mark-sweep 2055.2 (2250.1) -> 2055.1 (2243.6) MB, 430.2 / 0.1 ms  (average mu = 0.774, current mu = 0.001) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 00007FF69F2BB06D]
Security context: 0x016df73c0911 <JSObject>
    1: add [0000016DF73CE4B1](this=0x01f67eb09d19 <Set map = 0000033107F427A9>,0x027c9c275909 <String[95]: C:\Users\Administrator\Desktop\web\dgatp-web\src\views\inteeval\integrityCheck\libraryQuery.vue>)
    2: new Set(aka Set) [0000016DF73CDF91](this=0x035f496c05b1 <the_hole>,0x01c2bc707c59 <JSArray[5159]>)
    3: ConstructFrame [pc: 00007FF69F22AD4A]
  ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 00007FF69E70C26F
 2: 00007FF69E6B42A6
 3: 00007FF69E6B4F66
 4: 00007FF69EE9BC1E
 5: 00007FF69EE83F6A
 6: 00007FF69ED1567C
 7: 00007FF69ED121D0
 8: 00007FF69ED292CE
 9: 00007FF69ED30D74
10: 00007FF69ED29027
11: 00007FF69EBB09E6 
12: 00007FF69EBB2D7C
13: 00007FF69EBB19BA
14: 00007FF69EB05071
15: 00007FF69F2BB06D
16: 00007FF69F29AEC1
17: 00007FF69F299AA9
18: 00007FF69F22AD4A
19: 00007FF69F30F414
20: 00007FF69F22F51C
21: 00007FF69F22F51C
22: 00007FF69F22F51C
23: 00007FF69F22F51C
24: 00007FF69F22F51C
25: 00007FF69F2288AC
26: 00007FF69F22F51C
27: 00000249A4F1496D
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! vue-ele-project@1.0.0 dev: `webpack-dev-server  --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 134
npm ERR! Failed at the vue-ele-project@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

解决方法

第一步 

全局安装 

npm install -g increase-memory-limit

第二步

执行

increase-memory-limit

 好了,接下来再继续跑项目吧~没错就是这么简单两行代码 。

 类似资料: