How to run “nvm” in “oh my zsh”?
问题 In the system there is a nodejs , installed through nvm . The command is not running npm . Console is Oh my zsh 回答1: You can use zsh-nvm or enable it yourself by adding following lines to your ~/.zshrc export NVM_DIR=~/.nvm [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" Extra: For faster shell initialization, I use lazynvm which only loads node when needed lazynvm() { unset -f nvm node npm export NVM_DIR=~/.nvm [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm } nvm() {