在ubuntu VPS 16.04上安装js js?

时间:2016-08-29 17:58:03

标签: node.js ubuntu npm sails.js nvm

我在本地机器(ubuntu)sails js(0.12.4)上使用版本:

node -v =  v4.5.0, nodejs -v = v4.5.0, npm -v =2.15.9 and sudo npm -v = 3.10.0

它工作正常,而sailsjs没有在VPS 16.04 / 14.04 ubuntu服务器上安装。

当我尝试使用命令安装sails时最新:

sudo npm install -g sails

它提供以下输出:

Killed.............] | fetchMetadata: sill mapToRegistry uri https://registry.npmjs.org/tough-cookie

当我尝试使用以下命令安装时:

sudo npm install -g sails@0.11.5 or npm install -g sails@0.11.5

然后它显示以下错误消息:

> sails@0.11.5 preinstall /usr/lib/node_modules/sails
> node ./lib/preinstall_npmcheck.js

Sails.js Installation: Checking npm-version successful
npm WARN deprecated grunt-lib-contrib@0.7.1: DEPRECATED. See readme: https://github.com/gruntjs/grunt-lib-contrib
npm WARN deprecated native-or-bluebird@1.1.2: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
npm WARN deprecated lodash@2.4.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
Killed

请建议,如何在ubuntu 16.04 LTS上安装风帆?

谢谢!

1 个答案:

答案 0 :(得分:5)

您的VM上很可能没有RAM。

安装脚本通常会占用大量的堆空间,这可能需要1-2GB的RAM。如果您的运行时应用程序不需要这样的内存,您可以考虑从您的开发机器向您的虚拟机运送node_modules(或使用docker)。