nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
MIT License
80.78k stars 8.05k forks source link

Add --verbose option to help diagnose remote/install slowness #1159

Open scottnonnenberg opened 8 years ago

scottnonnenberg commented 8 years ago

I ran into some slowness here, thought nvm was hanging since it took over 2 minutes to do an nvm ls-remote: https://github.com/creationix/nvm/issues/1157

A --verbose option for nvm install/nvm ls-remote/nvm version-remote would really be useful to enable end users to diagnose their own issues. Specifically, if DNS/network/disk issues can have a negative effect on nvm, it will be useful to collect that information to better place blame.

elichai commented 5 years ago

Any updates on this?

ljharb commented 5 years ago

Nope, nobody's submitted a PR.

leonardiwagner commented 5 years ago

An alternative way to "debug" is using set -x before a nvm command:

$ set -x
$ nvm install 10

then a lot of output will be printed, I hope it helps :smile:

ljharb commented 5 years ago

That works, but is a pretty big hammer :-) a more tightly focused option would be nice.

benwinding commented 5 years ago

For Future Googler's

I was using a fresh Ubuntu installation, and forgot to install curl.

sudo apt install curl

After this I was able to see the nvm install 8 output...

naomiquinones commented 4 years ago

Hi @ljharb, @gitburd and I are looking into this and wondering if you can point us toward what sort of "more tightly focused option" could be used here?

ljharb commented 4 years ago

@naomiquinones that comment was mostly about the set -x over the entire nvm install command. A --verbose option that printed helpful info, but not quite as much as set -x does, would likely be helpful.