I found installing AVN, NVM difficult on Big Sur OS 11.1. Here's the steps I took to fix:
-
Assume you're using zsh. If not, switch to zsh
-
Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
-
Make sure the following is added to your
~/.zshrc
fileexport NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
-
Make sure it works:
exec "$SHELL" # reloads .zshrc, alternatively, restart yout terminal nvm --version # should output 0.37.2 or whatever
-
-
Switch to Node 12 temporarily to finish installation of AVN. For some reason,
avn setup
fails with Node 14 =(nvm install 14.15.0 # you'll need this later nvm install 12.13.0 nvm use 12.13.0 node -v # should output 12.13.0
-
Install AVN
npm install -g avn avn-nvm avn-n avn setup
-
Make sure the following is added to your
~.zshrc
file[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
-
Make sure it works:
exec "$SHELL" # reloads .zshrc, alternatively, restart yout terminal mkdir ./test-avn echo "14.15.0" | tee ./test-avn/.nvmrc cd ./test-avn # expect to see Node 14.15.0 activated by AVN using .nvmrc
-