Updating Node.js for Shinobi

Node.js version 22 or 20 are the currently recommended versions.

Update your Node.js version to at least 22. Install nvm (Node Version Manager).

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

Then update PM2. This is the daemon manager installed by default.

npm i pm2@latest -g
pm2 update

Update npm with the following

npm i npm -g

7. Reinstall Shinobi modules with the new node version as a base.

cd /home/Shinobi
rm -rf node_modules
sh UPDATE.sh
pm2 flush && pm2 restart camera && pm2 logs