npm config set unsafe-perm true
// This looks like a permissions issue in your home directory.
// To reclaim ownership of the .npm directory execute:
sudo chown -R $(whoami) ~/.npm
npm config set prefix ~/npm
export PATH="$PATH:$HOME/npm/bin"
sudo apt remove npm
sudo apt install npm