How to Update Node.js and NPM
Node.js 16 is recommended to run Shinobi
Date Added : Wed Jul 26 2017 18:17:16 GMT+0000 (Coordinated Universal Time)
Last Updated : Fri Dec 06 2024 18:08:35 GMT+0000 (Coordinated Universal Time)
Updating Node.js for Shinobi
Node.js version 20 or 18 are the currently recommended versions.
1. Update System (can skip if you did this recently)
sudo apt update sudo apt -y upgrade
2. Install Node.js repo
sudo apt update sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
3. Now you can update node.js with the following
sudo apt -y install nodejs
4. Update npm with the following
npm i npm -g
5. You may also consider updating these critical packages but if you already have a stable version of Shinobi running its not necessary.
sudo apt -y install gcc g++ make
6. Update PM2, the daemonizer
npm install pm2@latest -g
7. Reinstall Shinobi modules with the new node version as a base.
cd /home/Shinobi rm -rf node_modules sh UPDATE.sh pm2 restart all