install_nodejs.sh 285 Bytes
Newer Older
Vladimir Kiryakov's avatar
Vladimir Kiryakov committed
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

set -e

echo "Installing Node.js v9.x..."
apt-get install -y g++
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
apt-get install -y nodejs

npm -v >/dev/null || {
Spencer Williams's avatar
linting    
Spencer Williams committed
11
12
    echo >&2 'Node.js installation failed =('
    exit 1
Vladimir Kiryakov's avatar
Vladimir Kiryakov committed
13
14
15
}

echo -e "\n==> All good!"