FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed

2019-02-15 04:45发布

问题:

I can't make any search with npm:

npm search material

..results with the following error:

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

I tried with the following command

npm --max_old_space_size=16384 search material

but I had the same result.

npm version is 3.10.3

回答1:

According to npm's bug tracker, this has been fixed in npm@4.0.0. (see thread).

Searching works fine for me after upgrading npm:

npm install npm@latest -g

(you might need to su/sudo on your system)