下午给新电脑安装node, 第一次测试node,npm都可以用。然后就安装notepad++,vscode,python2.7。之后想着把npm全局路径给改了,执行npm config set prefix “G:\node”,没有问题。然后执行npm config get prefix 就报错,错误如下: 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]. 38488 ms: Scavenge 1389.9 (1435.0) -> 1389.9 (1435.0) MB, 35.8 / 0 ms [allocation failure].
<— JS stacktrace —> Cannot get stack trace in GC. FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory 然后测试其它命令,都有这个错误,比如之后卸载重新安装测试npm均有这个问题,换了其它版本安装还是如此,求教如何解决