From Ever changing code
Jump to navigation Jump to search

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


  • nodejs < 4.x

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

curl -sL | 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