DEV Community

Discussion on: How to fix "Unknown command nvm" on Linux

Collapse
 
zer0cream profile image
Dan • Edited

Dies for me for some reason. I had nvm working I could use nvm install, use etc. However, for some reason not "nvm use default 12" e.g. I just tried the steps you explained, but running into the same problem again.

I'm using fish shell as you can see from the output. The error is from within the NVM package.

 ✘  ⚙  ~/.nvm  fisher install edc/bass                                                                                                                                                                                                                                                                                                       1191ms
fisher install version 4.3.0
/usr/local/opt/nvm/nvm.sh (line 754): Unexpected ')' found, expecting '}'
      1) COLOR=$(nvm_print_color_code "$(echo "$NVM_COLORS" | awk '{ print substr($0, 1, 1); }')");;
       ^
from sourcing file /usr/local/opt/nvm/nvm.sh
    called on line 185 of file /usr/local/Cellar/fish/3.1.2/share/fish/config.fish
in function '.' with arguments '/usr/local/opt/nvm/nvm.sh'
    called on line 91 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
    called during startup
source: Error while reading file '/usr/local/opt/nvm/nvm.sh'
/usr/local/opt/nvm/etc/bash_completion.d/nvm (line 35): Unexpected ')' found, expecting '}'
      alias) __nvm_installed_nodes ;;
           ^
from sourcing file /usr/local/opt/nvm/etc/bash_completion.d/nvm
    called on line 185 of file /usr/local/Cellar/fish/3.1.2/share/fish/config.fish
in function '.' with arguments '/usr/local/opt/nvm/etc/bash_completion.d/nvm'
    called on line 92 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
    called during startup
source: Error while reading file '/usr/local/opt/nvm/etc/bash_completion.d/nvm'
Fetching https://codeload.github.com/edc/bass/tar.gz/HEAD
Installing edc/bass
           /Users/dan1/.config/fish/functions/__bass.py
           /Users/dan1/.config/fish/functions/bass.fish
Updated 1 plugin/s
Enter fullscreen mode Exit fullscreen mode