brew uninstall nvm
rm -rf ~/.nvm
# export NVM_DIR="{$HOME}/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
npm uninstall -g avn
rm -rf ~/.avn
rm ~/.avnrc
# [[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
brew install Schniz/tap/fnm
echo '14.5.0' > ~/.node-version
source /path/to/auto-node-version-switch.sh
Here is my updated script cause I don't want to place the default version in a file. Hope it helps. It also installs the required version if not found.