nvm: nvm.sh:114: parse error near `done'
Last week, I randomly started getting the following message when I open a new terminal window:
~/.nvm/nvm.sh:114: parse error near `done'
I tried uninstalling and reinstalling nvm with the following commands:
$ rm -rf ~/.nvm
# remove the nvm load script from my zshell config
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
but I’m still getting the message. Here are the relevant lines (110-114) from nvm.sh
:
local pathdir
pathdir=$(dirname "$node_path")
while [ "$pathdir" != "" ] && [ "$pathdir" != "." ] && [ "$pathdir" != "/" ] && [ "$pathdir" != "$tree" ]; do
pathdir=$(dirname "$pathdir")
done
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 28 (6 by maintainers)
omg. i found it. I had set up an alias to connect to my digital ocean server:
can’t believe it didn’t hit me that
do
is a reserved word. Everything’s working now. Thanks for all your help! I think you’ve taught me the skills to troubleshoot this on my own next time. cheers.In 2020, I had a similar issue with
alias done='send notification to my machine'
Thank you for opening this issue 😹@stevehanson this was EXACTLY my issue.
Holy hell I had done the same thing…
Haha thanks for saving me more pain than needed.
holy crap how many of us made the same digitalocean alias 😂
Another one 😃 This time it is not Digital Ocean but a todo list in terminal… Thought it was a good idea to create “do” alias 😵💫 Thanks for the help 😃
I’ll add my name to the list of shame. Thanks for sharing!
Just had this issue today and it’s the exact same alias screwing it up. LMFAO