Change the ownership of .npm by using the command sudo chown -R $(whoami) ~/.npm
.npm
sudo chown -R $(whoami) ~/.npm