致命错误:调用和重试上次分配失败-JavaScript堆内存不足
我无法使用npm进行任何搜索:致命错误:调用和重试上次分配失败-JavaScript堆内存不足,javascript,angularjs,node.js,npm,heap,Javascript,Angularjs,Node.js,Npm,Heap,我无法使用npm进行任何搜索: npm search material ..结果出现以下错误: npm WARN Building the local index for the first time, please be patient FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 我试着用下面的命令 npm --max_old_space_size=16384 sear
npm search material
..结果出现以下错误:
npm WARN Building the local index for the first time, please be patient
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
我试着用下面的命令
npm --max_old_space_size=16384 search material
但我得到了同样的结果
npm的版本是3.10.3根据npm的bug追踪器,这已经在npm@4.0.0. (见附件) 在以下情况下搜索对我来说很好: npm安装npm@latest-g
(您可能需要在您的系统上使用su/sudo)我曾经在节点脚本中遇到过类似的问题,我使用了以下标志:
node--max\u old\u space\u size=8192--优化\u size--max\u executable\u size=4096--stack\u size=4096。
。希望这对你有帮助。