I had a variant of the same issue (on Windows), where npm did't want to upgrade because of some dependency threw an error, even though I had deleted and reinstalled Node.
I dimply delete the followingfolders, and npm installed correctly.
Just be careful when messing around in the AppData folder!