How to update npm?

I’m working on Ubuntu 18.04 and when installing “npm” I had to do it with a package gesture, NVM because when I installed it with “SUDO” I had problems with permissions.
I did the installation following instructions instructions that I had saved but now I have lost them.
Now I have the need to update NPM:
New minor version of npm available! 6.4.1 → 6.10.0 │
│ Changelog:
What is the correct way to update “npm” without having permission problems in the future?
Thank you and excuse this simple question

The likely answer is:

npm install -g npm@latest

i.e. without using sudo

nvm is managing node and npm out of your home folder, and hence hopefully no permission problems.

1 Like

Thanks for support.
Ask why I did not want to make mistakes
Thank you

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.