wbyoung / avn

Automatic Version Switching for Node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't do Anything for me

pedro-mass opened this issue · comments

I was tired of using the shell command that nvm provided, since it slowed down switching directories.

After doing the recommended setup, and commenting out my previous script: I was hoping to see magic. NOTHING HAPPENED. Switching to directories with a .nvmrc triggers nothing. Am I missing a config step?

Details

  • avn 0.2.3
  • node v8.3.0
  • nvm 0.33.2
  • zsh zsh 5.2 (x86_64-apple-darwin16.0)
  • bash GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16) Copyright (C) 2007 Free Software Foundation, Inc.

The output of __avn_debug in the directory with a .node-version file is:

module.js:491
    throw err;
    ^

Error: Cannot find module 'commander'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/pedro.mass/.avn/bin/_avn:5:15)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)

avn is loaded in my ~/.{bash|zsh}{_profile|rc} file with:

# Node
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn

nvm specific

  • As an nvm user I am confirming that I did not install with Homebrew

It looks like something went wrong with your install since you're missing a module. You'll want to:

rm -r ~/.avn
npm install -g avn
avn setup

Closing this for now as there's not enough information at this point to investigate further.