Last night I tried to update my node and npm, it seemed to have been successful, however ever since then I have been getting this same error any time I try and run any npm c
I had the same issue on AWS server, i used this command to update the config permissions and the npm command worked smooth.
sudo chown -R $USER:$(id -gn $USER) ~/.config