Fresh install of NVM won't work
see http://nvm.sh
Install script:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
after you do this, close and reopen your terminal.
After a long troubleshooting, I got it working on mac OS:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Add the following lines in your
.zshrc
or.bash_profile
file:export NVM_HOME=/Users/your-user/.nvm export PATH=${PATH}:${NVM_HOME} source ${NVM_HOME}/nvm.sh
Note: Replace your-user in the above command with your home directory name.
Restart the terminal.
Verify:
nvm --version