I am trying to install NVM as per these instructions
I typed in this command in terminal:
$ curl https://raw.github.com/creationix/nvm/master/instal
Had the same problem, but this worked for me:
Since macOS 10.15, the default shell is zsh and nvm will look for .zshrc to update, none is installed by default. Create one with touch ~/.zshrc and run the install script again.
more info here: Troubleshooting on macOS
Figure out the following:
echo $0 to find out (normally works)source ~/.nvm/nvm.sh to that file (assuming that file exists at that location, it is the default install location)As you can see it states zsh and not bash.

To fix this I needed to add source ~/.nvm/nvm.sh to the ~/.zshrc file as when starting a new terminal my Deepin Terminal zsh reads ~/.zshrc and not bashs ~/.bashrc.
This happens because when installing NVM it adds code to ~/.bashrc, as my terminal Deepin Terminal uses zsh and not bash it never reads ~/.bashrc and therefor never loads NVM.
In other words: this is NVMs fault.
More on zsh can be read on one of the answers here.