FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScri

C:\Users\tt>npm install express -g
FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory


<--- Last few GCs --->


   73331 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 48.9 / 0 ms [allocation failure].
   73379 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 48.0 / 0 ms [allocation failure].
   73428 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 48.5 / 0 ms [allocation failure].
   73486 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 58.0 / 0 ms [allocation failure].
   73535 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 49.3 / 0 ms [allocation failure].




<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: Scavenger: semi-space copy

 Allocation failed - process out of memory



我的解决方案: 删除npmrc文件。

强调:不是nodejs安装目录npm模块下的那个npmrc文件 而是在C:\Users\{账户}\下的.npmrc文件....


你可能感兴趣的:(nodejs)