Labs has an old version of node installed (0.10), to get v6 (current LTS) with a newer npm...
- Example for node 6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
- Check the names of the versions of the
nodejs
package withapt-cache policy nodejs
- Run apt-get install with the correct version to install (
apt-get install package=version
)
- Example:
sudo apt-get install nodejs=6.9.5-1nodesource1~trusty1
- If you're going to need native modules,
apt-get install -y build-essential