On Tue, Sep 6, 2022 at 5:03 PM Frank R Dana Jr. <ferdnyc(a)gmail.com> wrote:
I wonder, should there also be /usr/bin/npm-16 and /usr/bin/npm-18,
ala
/usr/bin/pip3.7, /usr/bin/pip3.8, /usr/bin/pydoc3.7, ... ?
Right now, an 'npm' command always runs in whatever version is set as
/usr/bin/node, which makes it difficult to use a non-default version of
/usr/bin/node-* to install packages — which seems like it could be useful
for testing purposes.
Or is there some way I'm missing, that the single /usr/bin/node can be
used with different versions?
Hmm. `node-18 /usr/bin/npm install` seems to work (if the default is
node-16)... but that feels clunky.
_____________________________
I don’t think there’s really any value in using a different version of
Node.js than the default to run npm, barring an exceptionally serious bug.
Can you provide a specific example where it would matter?
I think there’s more value in making sure that the latest npm is compatible
with the older runtimes and standardize on that. I’ve got the npm package’s
self-test suite running against all the node versions in the %check section
to catch potential regressions.