3
votes

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
I use to have a similar problem with a node script, I used those flags: node --max_old_space_size=8192 --optimize_for_size --max_executable_size=4096 --stack_size=4096 .. Hopefully that helps you. - user5466293

1 Answers

3
votes

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)