Description
Bug Report
Summary and Repro
I set $N_PREFIX
to ~/.n
from my shell.
n seems to install:
-
~/.n/n/versions/node/22.5.1/
(around 183MB) -
~/.n/bin
,~/.n/lib
,~/.n/include
,~/.n/share
:❯ du -hs ~/.n/* 109M /home/slu/.n/bin 56M /home/slu/.n/include 18M /home/slu/.n/lib 183M /home/slu/.n/n 72K /home/slu/.n/share
Expected Behaviour
Some sort of symlink from ~/.n/bin/node
to ~/.n/n/versions/node/22.5.1/bin/node
and so on.
If I install one node version it will consume 180-whatever MB disk.
If I install two node versions it will consume 360-whatever MB disk.
Actual Behaviour
If I install one node version it will consume 360-whatever MB disk.
If I install two node versions it will consume 550-whatever MB disk.
Other Information
I fully expect that there are various issues that have come up in the past that express some desire for $N_PREFIX/bin/node
and friends NOT to be symlinks. However, I am not sure I buy that, because $N_PREFIX/bin/npm
is itself a symlink, to a "duplicated" $N_PREFIX/bin/../lib/node_modules/npm/bin/npm-cli.js
:
❯ ll ~/.n/bin/npm
lrwxrwxrwx 1 slu slu 38 Aug 1 07:38 /home/slu/.n/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
Even if the 100+MB node
executable has to get duplicated on disk why must we also do so for include/
and lib/
?