node.js 的小bugFATAL ERROR: MarkCompactCollector:

某人的错误:下午给新电脑安装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].

 

 

 

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

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

 

希望大家支持原创,支持杭州破冰,tks

 

<--- 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 sh: line 1: 35606 Abort trap: 6 NODE_ENV=localWillclass supervisor -i ./public,./build ./bin/twww npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "localWillclass" npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE npm ERR! willclass@4.2.20170901 localWillclass: `NODE_ENV=localWillclass supervisor -i ./public,./build ./bin/twww && gulp deploy --silent` npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the willclass@4.2.20170901 localWillclass script 'NODE_ENV=localWillclass supervisor -i ./public,./build ./bin/twww && gulp deploy --silent'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the willclass package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! NODE_ENV=localWillclass supervisor -i ./public,./build ./bin/twww && gulp deploy --silent npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs willclass npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls willclass npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/shuai/huitong/willclass/npm-debug.log
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页