From 92c05a494bc7aadac52daae75d23e6ecfc4d49ec Mon Sep 17 00:00:00 2001 From: RPI News <44128563+mobilegmYT@users.noreply.github.com> Date: Fri, 12 Mar 2021 22:04:18 -0700 Subject: [PATCH 1/2] Change nodejs to use nvm --- apps/Node.js/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/Node.js/install b/apps/Node.js/install index 0ef1d95..fc259ce 100755 --- a/apps/Node.js/install +++ b/apps/Node.js/install @@ -19,8 +19,9 @@ You need to install curl first. If you are on a debian system, this command shou exit 1 fi -#Add NodeSource repo: -curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash - || error "Failed to add Nodesource repo!" +#Install nvm manager: +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash || error "Failed to install nvm!" +source ~/.bashrc #Install NodeJS: -sudo apt install nodejs -y || error "Failed to install Node.JS" +nvm install --lts From 485ce37f833f2133a6aa52ea9deeff24015d915a Mon Sep 17 00:00:00 2001 From: RPI News <44128563+mobilegmYT@users.noreply.github.com> Date: Fri, 12 Mar 2021 22:07:27 -0700 Subject: [PATCH 2/2] Update uninstall --- apps/Node.js/uninstall | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/Node.js/uninstall b/apps/Node.js/uninstall index e3b5982..179fa81 100755 --- a/apps/Node.js/uninstall +++ b/apps/Node.js/uninstall @@ -8,11 +8,7 @@ function error { } #Uninstall NodeJS -sudo apt purge nodejs -y || error "Failed to purge Node.JS!" -sudo apt autoremove -y #who cares if this fails? +nvm uninstall default || error "Failed to purge Node.JS!" -#remove /etc/apt/sources.list.d/nodesource.list -sudo rm /etc/apt/sources.list.d/nodesource.list || error "Failed to remove nodesource repo!" - -#if your app installs any packages, keep this command here so those packages will be removed. -"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 \ No newline at end of file +#Remove nvm +sudo rm -rf ~/.nvm