source "$NVM_DIR/nvm.sh" || error "Failed to source $NVM_DIR/nvm.sh"
source "$NVM_DIR/bash_completion" || error "Failed to source $NVM_DIR/bash_completion"
nvm install --lts || error "Failed to install node.js with nvm!"
#Install NodeJS, if nvm fails, try again with a different 'NVM_DIR"
install_node || install_node set_nvm_dir "$HOME/.config/nvm" "failed to install node.js! trying again with different NVM_DIR..." || error "Failed to install Node.js using nvm!"