I am using npm v5.3.0. Now I want to update npm to v5.4.1.To do this I type the following in my terminal:
npm install -g npm
without any errors.Howe
I solved it on Ubuntu 18.04 LTS by switching to root using sudo su then I run the following
sudo su
curl -L https://www.npmjs.com/install.sh | sh