Updating node over apt causes npm downgrade

Every time I upgrade node.js (to 14.17.2 today) using apt, it somehow downgrades npm (e.g. from 7.19.1 to 6.14.13).
I have to manually upgrade npm using npm install -g npm every time. I've been doing this since npm version 7 came out and have experienced this issue on several machines (20.04, 18.04, Raspberry Pi OS x64, ...).

Node source file /etc/apt/sources.list.d/nodesource.list:

deb focal main
deb-src focal main

I've searched for similar issues on this network and on other sites, but found none.
Thanks for the help and information in advance!

1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like