I started using fish as my shell yesterday, and today I tried to run my NextJs App in the terminal using yarn and tailwind gave me an error about the node version. I checked it, and then I noticed that the current version was 10.19.0.
In my zsh shell, I have node, npm and nvm installed, and I can use them without any errors, but in my fish shell, only node is present. I tried to install nvm in the terminal with this command:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash
and the following output was:
=> nvm is already installed in /home/gabriel/.nvm, trying to update using git
=> error: pathspec 'v0.31.4' did not match any file(s) known to git
=> Source string already in /home/gabriel/.profile
main: linha 293: /nvm.sh: Arquivo ou diretório não encontrado
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="/home/gabriel/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm⏎
The last instruction gives me commands I can use to run nvm, but when I run them, I get an error
Commands given
export NVM_DIR="/home/gabriel/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
Output
~/.nvm/nvm.sh (line 942): Unexpected ')' found, expecting '}'
"${NVM_NODE_PREFIX}")
^
from sourcing file ~/.nvm/nvm.sh
called on line 185 of file /usr/share/fish/config.fish
in function '.' with arguments '/home/gabriel/.nvm/nvm.sh'
source: Error while reading file “/home/gabriel/.nvm/nvm.sh”