Actions

Serverless

From Ever changing code

This is a reference page to install dev tools to support serverless on Ubuntu 16.04. There are other more comprehensive sources than this.

Req:

  • nodejs < 4.x


Install nodejs from nodejs sources rather package manager. This installs npm and nodejs

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -  #LTS version
npm --version    #eg. 5.6.0
node --version   #eg. v8.11.3
nodejs --version #eg. v8.11.3


Optional install NVM Node Version Manager. With nvm the globally installed node apps and modules can reside in user space and there is no need to have them installed under /usr/lib/node_modules anymore, and so you'd not need to use sudo.


Install serverless. Option -g try-thread-sleep is a workaround from Issue 4319

sudo npm install -g try-thread-sleep
sudo npm install -g serverless --ignore-scripts spawn-sync
serverless version