holman / dotfiles

@holman does dotfiles
http://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/
MIT License
7.34k stars 3.36k forks source link

Homebrew installation of NVM is no longer supported. #294

Open ryanblakeley opened 6 years ago

ryanblakeley commented 6 years ago

From creationix/nvm:

Homebrew installation is not supported.

ryanblakeley commented 6 years ago

My current solution looks like this:

node/path.zsh

# Clone the zsh-nvm plugin (https://github.com/lukechilds/zsh-nvm#manually)
if ! [[ -a ~/.zsh-nvm ]]
then
  git clone https://github.com/lukechilds/zsh-nvm.git ~/.zsh-nvm
fi

# Load the zsh-nvm plugin
if [[ -a ~/.zsh-nvm ]]
then
  source ~/.zsh-nvm/zsh-nvm.plugin.zsh
fi

# TODO: Add the better npm completion plugin

# Clone the better npm completion plugin (https://github.com/lukechilds/zsh-better-npm-completion)
# if ! [[ -a ~/.zsh-better-npm-completion ]]
# then
  # git clone https://github.com/lukechilds/zsh-better-npm-completion.git ~/.zsh-better-npm-completion
# fi

# FIX: throws error about command compdef not existing
# if [[ -a ~/.zsh-better-npm-completion ]]
# then
  # source ~/.zsh-better-npm-completion/zsh-better-npm-completion.plugin.zsh
# fi

Then change Brewfile to install yarn without node so it doesn't collide with nvm's node:

Brewfile

brew 'yarn' --without-node

Looking for whatever feedback. Don't know if this is the best approach but just wanted to not use Homebrew for nvm.