nvm: nvm.sh parse error & bash_completion: too many arguments error

Operating system and version: macOS Catalina 10.15.7

nvm debug output:

➜ ~ nvm debug
nvm --version: v0.39.0
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/zsh
$SHLVL: 1
whoami: 'jreed'
${HOME}: /Users/jreed
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: /Library/Frameworks/Python.framework/Versions/3.8/bin:${HOME}/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt:/Library/Frameworks/Python.framework/Versions/3.8:/bin/usr/local/opt/maven@3.2/bin:${HOME}/Desktop/bin/code/seeks/venv/bin:${HOME}/.antigen/bundles/robbyrussell/oh-my-zsh/lib:${HOME}/.antigen/bundles/zsh-users/zsh-syntax-highlighting:${HOME}/.antigen/bundles/zsh-users/zsh-autosuggestions:${HOME}/.fzf/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.7.1 (x86_64-apple-darwin19.0)'
uname -a: 'Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64 x86_64'
checksum binary: 'sha256sum'
OS version: Mac 10.15.7 19H1519
curl: /usr/bin/curl, curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
wget: not found
sed: /usr/bin/sed
cut: /usr/bin/cut
basename: /usr/bin/basename
rm: /bin/rm
mkdir: /bin/mkdir
xargs: /usr/bin/xargs
git: /usr/local/bin/git, git version 2.33.0
ls: grep:: No such file or directory
grep: grep: aliased to grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}), grep (BSD grep) 2.5.1-FreeBSD
awk: /usr/bin/awk, awk version 20070501
nvm current: system
which node: /usr/local/bin/node
which iojs: iojs not found
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules

nvm ls output:

➜ ~ nvm ls

->       system
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)

How did you install nvm? install script in readme

What steps did you perform?

  • Installed via script (no errors)
  • Ensured the lines at end of my .zshrc existed pertaining to the install steps
  • restarted terminal

What happened?

  • I am getting the following output everytime my ZSH profile loads:
/Users/jreed/.nvm/nvm.sh:2376: parse error near `)'
/Users/jreed/.nvm/bash_completion:cd:89: too many arguments

What did you expect to happen?

  • I expect when my terminal loads to not see errors for nvm

Is there anything in any of your profile files that modifies the PATH? There was, but I removed them and retried and the issue still persists.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

$MAKE_CXX is empty. I unset all opts in zshrc and it still occurs. so it’s definitely not an options issue

Downgrading doesnt help. I am chalking this up to something with ZSH.