4 ms·
> NVM also changes the runtime automatically NVM requires sourcing a very slow loading script. The overhead NVM caused on my shell session constantly was pain
by the_mitsuhiko 6y ago
> NVM also changes the runtime automatically
NVM requires sourcing a very slow loading script. The overhead NVM caused on my shell session constantly was painful enough on a permanent basis that I went to look for alternatives. Even today based on experiences of some NVM holdouts it's still frustrating.
- capableweb 6y agoAgree, also had the same issue but it's easy to fix (and also cleans up your environment a bit) by doing the following alias: function n() { export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion } Now your shells startup time is not affected, and when you want to use node, you simply execute the `n` command first, and then you use nvm normally.
- the_mitsuhiko 6y agoI had all kinds of workarounds for that, even a custom zsh thing that tried to automate it as much as possible. Thankfully I no longer have to deal with this :)