xxxxxxxxxx
npm install -g npm@latest
#may require the use of sudo depending on your distro
sudo npm install -g npm@latest
xxxxxxxxxx
On Win10:
Run PowerShell as Administrator and sequentially enter commands:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade