From c96591b23166e866c4103e0facb33ebd15dcc4ec Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Sat, 5 Feb 2022 10:39:21 -0700 Subject: [PATCH] Fix node installation to recognize nvm --- install.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index b0d00aa..f198700 100755 --- a/install.sh +++ b/install.sh @@ -157,17 +157,23 @@ function __install_heroku() { } function __install_node() { - __install_with brew node - :q - + if [[ ! -e "/usr/local/opt/nvm/nvm.sh" ]]; then + __install_with brew nvm + echo "NVM has been installed, but you need to restart your shell to continue." + echo "Re-run '$0 node' when you have restarted." + exit 1 + else + source /usr/local/opt/nvm/nvm.sh + fi + nvm install 12 + nvm use 12 __install_with npm nodemon } function __install_python() { - __install_with brew pyenv - VERSION=$(pyenv install --list | sed 's/^ *//' | grep '^3.9' | tail -1) + VERSION=$(pyenv install --list | sed 's/^ *//' | grep '^3.10' | tail -1) pyenv install -s "$VERSION" pyenv global "$VERSION"