This is an attempt to resurrect this unresolved bug: https://github.com/npm/npm/issues/14458
For some reason, the command npm config get prefix
is multi-seconds slow. This normally wouldn't bother me, but for users of nvm
like me, this is really impacting since it uses this command internally, and nvm is used in shell startup scripts. See https://github.com/nvm-sh/nvm/issues/782 for more details. Therefore, shell startup is super slow, especially for those using WSL.
Always
NPM CLI
Run time npm config get prefix
, see multi-second response timing.
Run npm config get prefix
Result should come back quicker.
?
cc @darcyclarke; this actually would make a ton of difference for every nvm user, including every travis-ci run.
馃 I'm positive there's some digging to be done here
Has any progress been made with this? I would be interested in helping with this issue.
Recently, npm config get prefix
has been very slow on my machine. This seems to be ever since I moved the /var/
directory from my SSD to my HDD to free up some space.
The first time the command runs (as part of my .bashrc
script) it is especially slow, taking somewhere between 10-20 seconds. Later runs (by opening new shells) it 'only' takes a few seconds.
Most helpful comment
Recently,
npm config get prefix
has been very slow on my machine. This seems to be ever since I moved the/var/
directory from my SSD to my HDD to free up some space.The first time the command runs (as part of my
.bashrc
script) it is especially slow, taking somewhere between 10-20 seconds. Later runs (by opening new shells) it 'only' takes a few seconds.