From 10dafe3c4f9bb3bc8be3ef6cf87a20ff7cdfdbd8 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Sat, 6 Nov 2021 15:29:02 -0500 Subject: [PATCH] Install explicit npm version --- rootfs/standard/usr/bin/mynode_post_upgrade.sh | 2 +- rootfs/standard/usr/share/mynode/mynode_app_versions.sh | 1 + setup/setup_device.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 602201f6..1b346ede 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -199,7 +199,7 @@ if ! skip_base_upgrades ; then fi # Update NPM (Node Package Manager) - npm install -g npm@latest + npm install -g npm@$NODE_NPM_VERSION # Install Docker if [ ! -f /usr/bin/docker ]; then diff --git a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh index 1ee599fe..242c2333 100644 --- a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh +++ b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh @@ -130,6 +130,7 @@ WEBSSH2_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version WEBSSH2_LATEST_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version_latest NODE_JS_VERSION="14.x" +NODE_NPM_VERSION="^8.1.0" # Check for override files if [ -f /usr/share/mynode/mynode_app_versions_custom.sh ]; then diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 02f9ec8a..dc2e1d4e 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -290,7 +290,7 @@ usermod -aG docker root # Install node packages npm install -g pug-cli browserify uglify-js babel-cli -npm install -g npm@latest +npm install -g npm@$NODE_NPM_VERSION # Remove existing MOTD login info rm -rf /etc/motd