-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVM shouldn't source a shell script to start, it's too slow #2084
Comments
You're incorrect; the reason there's slowdown is entirely because auto-using invokes If you source with Lazy initialization is simply incorrect because it wouldn't make all global npm modules available on the command line along with The long term solutions are either to 1) have |
If we source nvm in .bashrc, it will be sourced every time on shell starts. Maybe we should export nvm functions, and encourage user source nvm in .bash_profile? |
It should be sourced every time each shell starts. |
Ok thanks
…On Tue, 14 Apr 2020 at 08:29, Jordan Harband ***@***.***> wrote:
It should be sourced every time each shell starts.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2084 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APFTVUUKBDUNNMAWM4AYEZLRMRXLDANCNFSM4IJQKEIA>
.
|
I was able to speed up terminal starts by changing the load script to have the # Load NVM
export NVM_DIR="$HOME/.nvm"
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" --no-use It's like |
For those that have found the standard process (without |
NVM causes way too much slowdown on terminal start because it's sourcing a shell script. It shouldn't have to do this for the NVM to work. This is in need of a full redesign of this idea. I don't know who thought that sourcing a slow shell script on shell start was a good idea.
Has no one in this project heard of lazy initialization? NVM has become an impediment to work, not a help.
The text was updated successfully, but these errors were encountered: