npm install 在没有一个好的错误的情况下被杀死 [英] npm install killed without a good error

查看:24
本文介绍了npm install 在没有一个好的错误的情况下被杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我跑步时

ng new new-app

要创建 angular2 应用程序,angular-cli 创建文件并运行

npm 安装

然后 npm install 被终止,没有任何错误消息. 网上几乎所有答案都指出可能是内存不足的问题,所以我将 VPS 从 512MB 升级到 1GB 内存.>

在我看来,1GB RAM 的全新 Ubuntu 16.04 不太可能 npm 安装标准的 angular2 应用程序.除了添加交换或内存之外,还有什么我可以尝试的吗?

谢谢!

解决方案

给机器增加 RAM 解决了问题(从 1GB 到 2GB).

如果其他人遇到问题并且无法或不想添加 RAM,请考虑使用 yarn 而不是 npm.

When I run

ng new new-app

to create an angular2 app, angular-cli creates the files and runs

npm install

The npm install is then killed without any error message. Almost all answers online pointed to a possible problem with running out of memory, so I upgraded my VPS from 512MB to 1GB of RAM.

It seems unlikely to me that a fresh Ubuntu 16.04 with 1GB RAM cannot npm install a standard angular2 app. Is there anything else I can try other than adding swap or ram?

Thanks!

解决方案

Adding RAM to the machine solved the problem (from 1GB to 2GB).

If someone else encounters the problem and cannot or doesn't want to add RAM, consider using yarn instead of npm.

这篇关于npm install 在没有一个好的错误的情况下被杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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