node.js npm 模块设置报错FATAL ERROR: MarkCompactCollector:

今天在执行npm config set prefix “F:\nodejs\node_global”报错,错误信息如下:

FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory

<— Last few GCs —>

38340 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 36.7 / 0 ms [allocation failure]. 38378 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 37.6 / 0 ms [allocation failure]. 38415 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 37.6 / 0 ms [allocation failure]. 38452 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 36.6 / 0 ms [allocation failure].

 经过搜索,最后的解决方案是删除npmrc文件(不是nodejs安装目录npm模块下的那个npmrc文件,而是C:\Users\{账户}\下的.npmrc文件

你可能感兴趣的:(Java)