Skip to content

Instantly share code, notes, and snippets.

@BenGitsCode
Last active January 27, 2017 13:33
Show Gist options
  • Save BenGitsCode/353ed87a7d1fcefb5e7ba2e59548bda2 to your computer and use it in GitHub Desktop.
Save BenGitsCode/353ed87a7d1fcefb5e7ba2e59548bda2 to your computer and use it in GitHub Desktop.
Record of nvm tmux oh-my-zsh issue

It Begins

  • Ran brew install tmux
  • npm, nvm, node stop working and I get the following error upon sourcing ~/.zshrc
 ✘ ~
〉 reload
/Users/Benjamski/.zshrc:source:91: no such file or directory: /usr/local/Cellar/nvm/0.33.0/nvm.sh
ZSH config reloaded from ~/.zshrc
 ~
〉 ls /usr/local/Cellar/nvm/
0.31.0 0.31.1 0.31.4 0.32.0 0.32.1

Tried

changing nvm path to all of these with reloading zshrc

# NVM (original)
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"

# # gh fix
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

uncommenting this PATH fixed the strange breaking of nvm and npm that installing tmux created.

export PATH="/usr/local/var/rbenv/shims:/Users/Benjamski/.rbenv/bin:/Users/Benjamski/.nvm/versions/node/v4.4.0/bin:/usr/local/bin:/Users/Benjamski/.rbenv/shims:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Now with all of those commented back INCLUDING the abover (found under user configuration in .zshrc) npm, node, nvm all seem to be working fine.

This is primarily to have a record of what happened so I can understand it better with time permitting.

The problem now seems isolated to nvm. Npm and node work as expected, but nvm shows

zsh: command not found: nvm

Day 2

  • backed up machine ¯_(ツ)_/¯
  • recommented user configuration line
  • Ran following:
brew install nvm
〉 nvm install --lts=boron
Installing with latest version of LTS line: boron
v6.9.4 is already installed.
nvm Now using node v6.9.4 (npm v4.1.1)
 ~
〉 nvm alias default v6
default -> v6 (-> v6.9.4)

But now the output of nvm which is:

〉 nvm which
No .nvmrc file found

followed by the nvm help page.

node, npm, nvm seem to otherwise be working so far? _(ʘ_ʘ)_/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment