5 ms·
If you use zsh I wrote a little wrapper for nvm that adds a few handy features. Upgrades can be done with `nvm upgrade`. https://github.com/lukechilds/zsh-nvm
by lukechilds 10y ago
If you use zsh I wrote a little wrapper for nvm that adds a few handy features. Upgrades can be done with `nvm upgrade`.
https://github.com/lukechilds/zsh-nvm https://github.com/lukechilds/zsh-nvm
- drinchev 10y agoI'm trying to install it ( antigen ) but it complains that I already have a nvm installed ( well I do, but should I remove it ? )
- lukechilds 10y agoIt should work fine with existing nvm installs, have you commented out the line where you're manually sourcing nvm? If you have can you paste the exact message you're getting?
- drinchev 10y agoI haven't commented out any lines. λ ~ ◆ antigen bundle lukechilds/zsh-nvm .Cloning into '/Users/drinchev/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-lukechilds-SLASH-zsh-nvm.git'... remote: Counting objects: 228, done. remote: Compressing objects: 100% (47/47), done. remote: Total 228 (delta 16), reused 0 (delta 0), pack-reused 178 Receiving objects: 100% (228/228), 29.54 KiB | 0 bytes/s, done. Resolving deltas: 100% (91/91), done. Checking connectivity... done. Installing nvm... fatal: destination path '/Users/drinchev/.nvm' already exists and is not an empty directory. fatal: Not a git repository (or any of the parent directories): .git fatal: Not a git repository (or any of the parent directories): .git λ ~ ◆ Anyway I think the problem is that it is trying to install nvm, which I already have. Not sure I want to delete my .nvm, since I'm going to loose all my node installs
- lukechilds 10y agoAhhh, zsh-nvm requires that nvm has been installed via git. Although it shouldn't be trying to install over your previous installation, it checks if nvm exists first with `[[ ! -f "$NVM_DIR/nvm.sh" ]]`. Out of interest what does: `[[ ! -f "$NVM_DIR/nvm.sh" ]] && echo "nvm doesn't exist" || echo "nvm exists"` return? If you wanna try it out you could backup your "$NVM_DIR/versions" folder and restore it. That holds all your node installs and global modules.
- drinchev 10y agoλ ~ ◆ [[ ! -f "$NVM_DIR/nvm.sh" ]] && echo "nvm doesn't exist" || echo "nvm exists" nvm doesn't exist λ ~ ◆ Yeah, but tomorrow I'm GMT+2 :D
- lukechilds 10y agoStrange... Is it a symlink or something? Does `ls "$NVM_DIR"` list nvm.sh anywhere?
- drinchev 10y agoNo :( I've opened an issue, because I think we're polluting HN https://github.com/lukechilds/zsh-nvm/issues/11 https://github.com/lukechilds/zsh-nvm/issues/11