npm install - javascript 堆内存不足 [英] npm install - javascript heap out of memory
本文介绍了npm install - javascript 堆内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行 npm install -g ionic
时出现以下错误:
When running npm install -g ionic
I get the following error:
致命错误:CALL_AND_RETRY_LAST 分配失败 - JavaScript 堆内存不足
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
有没有办法全局增加node.js的内存限制?
Is there a way to globally increase the node.js memory limit?
推荐答案
您可以使用 :
node --max-old-space-size=8000 $(which npm) install -g ionic
如此处所述,默认值为 4000 (4Gb).
As described here, the default is 4000 (4Gb).
这篇关于npm install - javascript 堆内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文