Closed drinchev closed 8 years ago
Thanks for taking the time to submit an issue 👍
That's very strange, it doesn't look like a valid nvm install, there's lots of files missing. What does nvm --version
output?
Also, could you paste the line you're using to source your existing install?
You are totally right.
λ ~ ◆ nvm --version
0.30.1
λ ~ ◆ cat ~/.zshrc | grep nvm
plugins=(git aws brew brew-cask cp coffee emoji node npm nvm osx rsync sublime k catimg)
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
λ ~ ◆ brew --prefix nvm
/usr/local/opt/nvm
λ ~ ◆
I got your idea. Probably nvm was installed via brew and this is just a leftover.
Ahh Homebrew installation isn't recommended by nvm
, it doesn't export the NVM_DIR
environment variable which makes it pretty much impossible to work with and causes crazy bugs like this haha.
This isn't really a bug in zsh-nvm
you just have a bit of a mangled install. To fix run rm -rf ~/.nvm
and comment out export NVM_DIR=~/.nvm
in .zshrc
. That will clear your old broken install. Now zsh-nvm
will be able to install, however it won't pick up your brew install (because the brew version doesn't export NVM_DIR
) so it will pull a fresh copy of nvm into ~/.nvm
.
You can then copy the /usr/local/opt/nvm/v*
and /usr/local/opt/nvm/alias
directories to ~/.nvm
to migrate your node installs/aliases from your brew nvm
to your zsh-nvm
nvm
. Then you can safely run brew uninstall nvm
and you won't lose any of your node versions.
You'll then have nvm installed via an offically supported install method (git
) and also be able to keep up to date with nvm updates with nvm upgrade
/nvm revert
. Lazy loading is also worth checking out 👍
@drinchev Did you get this sorted? Can I close the issue?
Yes, please close the issue.
Sent from my iPhone
On 22 Oct 2016, at 17:46, Luke Childs notifications@github.com wrote:
@drinchev Did you get this sorted? Can I close the issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I have a problem installing
zsh-nvm
via antigenI already have nvm installed on my machine ( OS X El Capitan )
Additional information :