Tuesday, October 11, 2022

speed up oh my zsh launch

Slow Start Up

The first time I launch terminal (which I rarely do) it takes about 10 seconds to finish loading.  Way longer than it should but I didn't bother fixing it.

 

What Really Happened

Still slow, adding the two lines to .zshrc did not fix it. Commented them out.

Added:

export NVM_LAZY=1


Will not fix for now.

 

 

Fix

Launch your Terminal app.  I used the nano editor in Terminal. 

Edit .zshrc

 

nano .zshrc

then copy and paste, the lines below to the end of your .zshrc file

# configure node version manager
export NVM_DIR=~/.nvm [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" --no-use 
# This loads nvm
alias node='unalias node ; unalias npm ; nvm use default ; node $@'
alias npm='unalias node ; unalias npm ; nvm use default ; npm $@'
 

Info