Comment 3 for bug 2001928

Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

Well, "sudo apt install nodejs=14.21.1-deb-1nodesource1" really works.
But it's not permanent solution because if you perform "sudo apt update && sudo apt upgrade", then NodeJS is replaced by version 18.x

I would say that Ubuntu 22.10 has different order of resolving of repos than 22.04 when one package is in multiple repos (14.x in external repo vs. 18.x in internal repo).

>
> Mind that it may break your system - lots of other debian packages are
> depending on the version provided in debian.
> If you really want a given version, use containers, or even simpler, a
> nodejs binary release tarball.

I see, but I don't remember it was ever an issue for me in previous Ubuntu versions to switch between various NodeJS versions (the tools such as "nvm" or "n" provide such switching).