Skip to content

Commit

Permalink
Migrate to modern node.js installation method
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Lindqvist <[email protected]>
  • Loading branch information
cazfi committed Sep 3, 2023
1 parent 1533a9a commit 0b66215
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 0b66215

Please sign in to comment.