Use nodesource to install node (#742)

The node installed by nvm gives errors when running "npm install".

Also installs Python as it is need. Presumbly the system provided npm
version has python as a dependency so it was installed when npm was
installed.
This commit is contained in:
Lai Jiang 2020-08-05 14:56:40 -04:00 committed by GitHub
parent 915405b735
commit 95f4ae0e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,15 +21,11 @@ apt-get install apt-utils gnupg -y
apt-get upgrade -y
# Install Java
apt-get install openjdk-11-jdk-headless -y
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Install node
nvm install node
# Install npm
nvm install-latest-npm
# Install Python
apt-get install python -y
# Install Node
curl -sL https://deb.nodesource.com/setup_current.x | bash -
apt-get install -y nodejs
# Install gcloud
# Cribbed from https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
apt-get install lsb-release -y