Mac terminal says "-bash: echo: write error: Broken pipe" on opening
A shell's error message is really straight forward. The structure consists of the command, the filename, and the error message.

command: filename: message


Your error message is a bit more complicated in the fact that you are using  a shell builtin command and the filename is a stream through a pipe. So, my best guess would be that somewhere in nvm.sh, there is a line that is something like echo something | command, where command is closing the pipe before echo finishes sending the data.