npm install-javascript堆内存不足 [英] npm install - javascript heap out of memory

查看:404
本文介绍了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?

推荐答案

您可以使用以下命令启动NPM:

You can launch NPM using :

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆