0

Whenever I use npm, I get a big fat warning:

╭────────────────────────────────────────────────────────────────╮
│                                                                │
│      New major version of npm available! 6.14.11 → 7.12.1      │
│   Changelog: https://github.com/npm/cli/releases/tag/v7.12.1   │
│               Run npm install -g npm to update!                │
│                                                                │
╰────────────────────────────────────────────────────────────────╯

The current npm version is the one that came with my distibution (Kubuntu 20.10, will be updating to 21.04 soon).

Is it safe/advised to let npm update itself without using the apt package manager?

I have managed to (temporarily) destroy my nodejs/npm installs more than once in the past, so I'd rather be safe than sorry.

2
  • This answer from a few years back will give you what you need if you choose to update 👍🏻 – matigo May 12 at 21:52
  • @matigo Thank you, but the linked answer does not explain what npm install -g npm does when npm is installed as an apt package. For example, what will happen if I (or a distro update) updates the npm package? Which update "wins"? Will there be inconsistencies with other packages provided by the distribution? – Zilk May 13 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.