Just a thought - I’m a Raspberry Pi Node-Red user who keeps getting noidications about NPM updates and today a minor update. As usual it seems the author of the update noice assumed that everyone is ROOT.
“npm install -g npm”
I almost never use root and most node-red updates and install don’t need sudo either. This update of course failed as user Pi - adding sudo (which is not common sense to EVERYONE, trust me) in the instructions might be helpful?