Setup Node and NVM with Fish Shell

fabientownsend

Fabien Townsend

Posted on January 29, 2024

Setup Node and NVM with Fish Shell

Here is how to quickly install NVM with Fish Shell. I do assume here that you have fish shell installed and bew. If you don't have fish shell installed, you can follow my other tutorial here: TL;DR setup Fish Shell MacOS

1: Install nvm with brew

brew install nvm
Enter fullscreen mode Exit fullscreen mode

2: Install bass for Fish Shell

omf install bass
Enter fullscreen mode Exit fullscreen mode

3: Configure Fish shell

# ~/.config/fish/config.fish

...

function nvm
  bass source (brew --prefix nvm)/nvm.sh --no-use ';' nvm $argv
end

set -x NVM_DIR ~/.nvm
nvm use default --silent
Enter fullscreen mode Exit fullscreen mode

And that's it, you are good to go, you can install node now:

nvm install --lts
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
fabientownsend
Fabien Townsend

Posted on January 29, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related