Nvm: .nvm/nvm.sh: line 587: syntax error near unexpected token `}'

Created on 11 Jul 2017  路  5Comments  路  Source: nvm-sh/nvm

Running terminal in Mac OS X Sierra.

bogon:~ jerry$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11699  100 11699    0     0  14366      0 --:--:-- --:--:-- --:--:-- 14354
=> Downloading nvm from git to '/Users/jerry/.nvm'
=> Cloning into '/Users/jerry/.nvm'...
remote: Counting objects: 6480, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6480 (delta 1), reused 3 (delta 1), pack-reused 6475
Receiving objects: 100% (6480/6480), 1.92 MiB | 7.00 KiB/s, done.
Resolving deltas: 100% (4017/4017), done.
* (HEAD detached at v0.33.2)
  master
=> Compressing and cleaning up git repository
Counting objects: 6480, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6436/6436), done.
Writing objects: 100% (6480/6480), done.
Total 6480 (delta 4275), reused 1995 (delta 0)

=> nvm source string already in /Users/jerry/.bash_profile
=> bash_completion source string already in /Users/jerry/.bash_profile
/Users/jerry/.nvm/nvm.sh: line 587: syntax error near unexpected token `}'
/Users/jerry/.nvm/nvm.sh: line 587: `}'
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
non-issue / invalid

Most helpful comment

image
I change to utf-8 is OK.
Thank you help!

All 5 comments

hm, this suggests the download was somehow corrupted, but it's using git, so it should be working.

Do you get the same syntax error if you . ~/.nvm/nvm.sh?

I use "Terminal" , it's not working.

bogon:.nvm jerry$ sh nvm.sh
nvm.sh: line 587: syntax error near unexpected token `}'
nvm.sh: line 587: `}'

but I use "iTerm" ,its's woring good.

Do you perhaps have a custom language or encoding set on your system, that's not set in iTerm?

1553 in particular seems similar.

image
I change to utf-8 is OK.
Thank you help!

Was this page helpful?
0 / 5 - 0 ratings