Skip to content

Commit

Permalink
Merge pull request #747 from cazfi/nodejs
Browse files Browse the repository at this point in the history
Migrate to modern node.js installation method
  • Loading branch information
cazfi authored Sep 7, 2023
2 parents 299f801 + 0b66215 commit 12aa952
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/install/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ TMPINSTDIR=$(mktemp -d)

echo "==== Installing Node.js ===="
if [ "${INSTALLED_NODEJS}" = N ]; then
cd "${TMPINSTDIR}"
curl -LOsS 'https://deb.nodesource.com/setup_20.x'
sudo bash setup_20.x
NODE_MAJOR=20
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo ${APT_GET} update
sudo ${APT_GET} install --no-install-recommends nodejs
if ! command -v npm >/dev/null ; then
sudo ${APT_GET} install --no-install-recommends npm
Expand Down

0 comments on commit 12aa952

Please sign in to comment.