致命错误:CALL_AND_RETRY_LAST分配失败 - JavaScript堆内存不足

时间:2016-08-12 09:25:26

标签: 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 search material

但我的结果相同。

npm版本是3.10.3

1 个答案:

答案 0 :(得分:3)

根据npm的bug追踪器,这已在npm@4.0.0中修复。 (见thread)。

upgrading npm之后搜索工作正常。

  

npm install npm @ latest -g

(您可能需要su / sudo在您的系统上)