shell - Why have nvm related commands —nvm, node, npm— stopped working? -


os: macos sierra 10.12.6 (16g29) terminal app: hyper 1.3.3.1754 nvm: 0.33.2 

i installed nvm, according instruction, sometime ago without issue. recently, , commands it's responsible —node , npm— stopped working.

nvm/npm/node command not found

i realized occurred because switched system default shell bash zsh —chsh -s /bin/zsh— without addressing contents of ~/.bash_profile sourced bash not zsh.

the nvm install script
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
places following in appropriate config file —one of: ~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc.

export nvm_dir="$home/.nvm" [ -s "$nvm_dir/nvm.sh" ] && \. "$nvm_dir/nvm.sh"  # loads nvm [ -s "$nvm_dir/bash_completion" ] && \. "$nvm_dir/bash_completion"  # loads nvm bash_completion 

at time of install used bash , bit placed in ~/.bash_profile. coping content on ~/.zshrc got commands working again.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -