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
Please try this for the latest (5.4.1) version:
npm install -g npm@latest
or for any specific version, for e.g.:
npm install -g npm@5.4.1
If that doesn't help, go to where you have npm installed and remove the files: npm, npm.cmd.
After that please try to npm install -g npm@5.4.1 again.