Varcor Varcor - 4 months ago 55
Node.js Question

Install laravel Elixir on Ubuntu 16.04 Getting Killed Message

I am tring to install Laravel Elixir on Ubuntu 16.04. I Install NodeJS, Apache, PHP7.0 FPM, MySQL, Composer, NPM. All of those will run perfectly. I can pull up Laravel Framework. If I try to install Laravel Elixir I run the command

npm install --global gulp-cli
Which is fine and then when I run
npm install
and I get a Killed Message

root@dev:/var/www/html/bookkeeper# npm install
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
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 lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
loadDep:isarray → addName ▀ ╢████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
Killed


I tried this on a Fresh Ubuntu a few times. I even tried on the digitalocean NodeJS version on 14.04. Am I missing dependencies? I am following the docs on https://laravel.com/docs/5.2/elixir#installation

Answer

Your droplet is running out of RAM i expect. The free way to resolve this is to create some swap space and use the disk when your memory runs out. Otherwise use a bigger droplet.

// Create and enable 2GB swap space
sudo dd if=/dev/zero of=/var/swap1 bs=1G count=2
sudo chmod 600 /var/swap1
sudo mkswap /var/swap1
sudo swapon /var/swap1

// Make changes permanent (in vi/vim/nano, whatever)
sudo vi /etc/fstab

// Add the following line to the file and save
/var/swap1   none    swap    sw    0   0

Then you should be able to rerun npm install

Comments