wbyoung / avn Goto Github PK
View Code? Open in Web Editor NEWAutomatic Version Switching for Node
License: MIT License
Automatic Version Switching for Node
License: MIT License
✗ n
node/0.10.32
ο node/4.0.0
node/4.1.2
✗ cd ..
cd avn activated 4.0.0 via ../.node-version (avn-nvm v4.0.0)
✗ cd imgur-client
avn activated v0.10.32 (avn-n 0.10.32)
✗ node -v
v4.0.0
✗ which node
/Users/martins/.nvm/versions/node/v4.0.0/bin/node
RVM has addressed rvm/rvm#2819, and did it slightly differently, so we should update to use that method.
Do I need to install avn in every single node environment on my system, and then remember to keep them all up to date?
Hi, not quite sure what failed here.
Sites ❯ mattermind-site
Gemfile Makefile bower.json config.rb gulpfile.js off scrap work
Gemfile.lock README.md bower_components dist node_modules package.json src
avn could not activate node v0.10.32
mattermind-site ❯ _avn explain -v .
avn could not activate node v0.10.32
error: no plugin passed predicate
avn-nvm: nvm exited with status: 127
avn-n: no version matching v0.10.32
mattermind-site ❯ nvm list
iojs-v1.3.0
iojs-v2.0.0
v0.10.32
-> system
node -> v0.10.32
stable -> 0.10 (-> v0.10.32) (default)
It would appear that nvm has v0.10.32 but maybe its being invoked wrong.
avn: 0.1.7
avn-nvm: 0.1.5
thanks
OSX Yosimite 10.10.5
n
avn
When avn switches versions of node, I get the following errors...
/usr/local/bin/n: line 254: /usr/local/n/versions/.prev: Permission denied
cp: /usr/local/lib/dtrace/node.d: Permission denied
cp: /usr/local/lib/node_modules/npm/.npmignore: Permission denied
cp: /usr/local/lib/node_modules/npm/.npmrc: Permission denied
cp: /usr/local/lib/node_modules/npm/.travis.yml: Permission denied
... AND LOTS MORE ...
NOTE: It appears the node version is switched (e.g. node --version prints out correct version)
But, I am not confident because of these errors.
When installing anything globally, I have to use sudo (always have had to on my mac). So, n and avn were installed using sudo.
I get this same issue when running n without sudo. So, I believe if I could have avn run n using sudo, this would solve the issue.
Is there a way to have avn run n as sudo? Or, is there a different approach I should be taking here?
When I start a command on tmux like
tmux split-window -v -p 20 -t session "grunt"
It is not switching to .node-version
When I open a new zsh session in a directory that contains a .node-version
or a .nvmrc
, the node version does not automatically change. I need to do a cd .
in order for avn
to recognize and change the node version.
Details
0.2.3
v8.4.0
0.33.4
5.4.1
The output of __avn_debug
in the directory with a .node-version
file is: empty
avn
is loaded in my ~/.{bash|zsh}{_profile|rc}
file with:
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific
nvm
user I am confirming that I did not install with HomebrewPerhaps I'm missing something, but why not use the package.json? why are we creating another meta file that duplicates a piece of information about node that can already be stored in the package.json?
So it puts it in the .bash_profile, maybe it should also append it to the home .zshrc like rvm and nvm?
I get a "command not found" error when trying to run __avn_debug or _avn in the shell.
I installed via "npm i -g avn avn-nvm" and successfully ran "avn setup".
Please describe your issue clearly and also include all details below.
Details
0.2.3
v7.4.0
0.33.0
n: command not found
zsh 5.0.8 (x86_64-apple-darwin15.0)
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
The output of __avn_debug
in the directory with a .node-version
file is:
avn could not activate node lts/boron
error: no plugin passed predicate
avn-nvm: no version matching lts/boron
avn
is loaded in my ~/.{bash|zsh}{_profile|rc}
file with:
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific
nvm
user I am confirming that I did not install with HomebrewI was under the impression (based on the fact that #43 had been closed) that nvm aliases like lts/boron
were now supported by avn
and/or avn-nvm
. However, I have tried the following content in both a .nvmrc
and a .node-version
file and neither is picked up by avn
:
lts/boron
The alias does seem to be working correctly with nvm
:
jduckwor$ nvm use
Found '/Users/jduckwor/WorkRelated/managed_code/mvt-platform/mvt-image-backend/.nvmrc' with version <lts/boron>
Now using node v6.9.4 (npm v3.10.10)
Does AVN work on windows? There is a nvm-windows library, but I wasn't sure if the avn-nvm would work with that.
This tool is looking great so far and it woud be great if it would also support fish shell: https://github.com/fish-shell/fish-shell
I tried to simply modify the syntax to fish-shell: [[ -s "$HOME/.avn/bin/avn.sh" ]]; and source "$HOME/.avn/bin/avn.sh" # load avn
but it is not working completely since fish also seems to have issues with the square brackets.
What exactly is the first bit doing? That might make it easier to translate to fish.
I'm having some trouble getting up and running with avn
. I've installed it for nvm
and ran avn setup
. Here's what happens when I try to use it, though:
$ node --version
v0.10.32
$ __avn_debug
avn activated 4.2.2 (avn-nvm v4.2.2)
nvm use v4.2.2 > /dev/null;
$ node --version
v0.10.32
$ cd .
$ node --version
v0.10.32
$ nvm use v4.2.2
Now using node v4.2.2 (npm v2.14.7)
It does seem to set the right version sometimes, though. Maybe when I first open a new terminal session and cd to the directory.
Is it possible for avn to directly support the .nvmrc
file I already have in my project?
Perhaps some logic could be incorporated to do an OR
operation when searching (e.g. '.node-version' || '.nvmrc'
). Having to duplicate that file is unfortunate because then both have to be in sync.
I'm currently symlinking the file but would love to not have to do that.
Thanks!
I have an issue similar to #7. Any hints or ideas what might be causing this?
$ cat .node-version
v0.10.38
$ _avn explain -v .
avn could not activate node v0.10.38
error: no plugin passed predicate
avn-nvm: nvm exited with status: 127
avn-n: no version matching v0.10.38
.node-version
seems like a throwback at .ruby-version
. There's no need to copy them, though... package.json already has an engine
field which defines what node version you want to use.
Right now plugins aren't copied into the ~/.avn
directory during install. This means that when you switch node versions, you'll lose the globally installed plugins that were associated with the node version you started with.
They should probably be copied into ~/.avn
during the install step of avn setup
.
We will need to change the way plugins are loaded via require
so that they are referenced from the installed location instead of globally.
After getting this issue and finding the root cause, I though about sharing it here, too. Perhaps the code / logging / documentation could be improved based on it.
As it can be seen, the avn failed to active the correct node even if the avn setup
and shell restart were run succesfully. The reason was missing nvm.sh file under home directory.
> avn could not activate node v0.12.7
> __avn_debug
avn could not activate node v0.12.7
error: no plugin passed predicate
avn-nvm: nvm exited with status: 127
zsh:source:1: no such file or directory: /home/juha/.nvm/nvm.sh
zsh:1: command not found: nvm
> ls -l ~/.nvm
total 0
drwxr-xr-x 1 juha juha 14 syys 16 22:23 alias
drwxr-xr-x 1 juha juha 44 syys 16 20:43 bin
drwxr-xr-x 1 juha juha 8 syys 16 20:44 versions
> whereis nvm
nvm: /usr/share/nvm
> ls -l /usr/share/nvm
total 72
-rw-r--r-- 1 root root 1846 syys 28 20:43 bash_completion
-rw-r--r-- 1 root root 95 syys 28 20:43 init-nvm.sh
-rw-r--r-- 1 root root 62737 syys 28 20:43 nvm.sh
ln -s /usr/share/nvm/nvm.sh /home/juha/.nvm/nvm.sh
After linking the file the activation worked.
The nvm was installed via Arch Linux AUR, so it could be the reason, I don't know?
Is there a section / docs about how to remove avn from my system?
npm uninstall avn avn-nvm
and removed ~/.avn and ~/.avnrc but still get this _avn: command not found
edited my ~/.bashrc and source it
One of my colleagues is seeing this when trying to install avn today on nodejs 4.2.6:
/Users/john/.avn/node_modules/bluebird/js/main/promise.js:677
throw e;
^
TypeError: fs.readFile(...).catch(...).then(...).reduce is not a function
at Object.exports._all (/Users/john/.avn/lib/plugins.js:56:4)
at Object.all (/Users/john/.avn/lib/plugins.js:21:38)
at Object.exports.first (/Users/john/.avn/lib/plugins.js:84:33)
at match (/Users/john/.avn/lib/hooks.js:29:18)
at Object.<anonymous> (/Users/john/.avn/lib/hooks.js:76:29)
at Object.tryCatcher (/Users/john/.avn/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/Users/john/.avn/node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (/Users/john/.avn/node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromises (/Users/john/.avn/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/Users/john/.avn/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/Users/john/.avn/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/john/.avn/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
When tracing through this, it seems like the promise returned from fs.readFile (via the mz module) is actually a native ES6 Promise instead of a bluebird Promise. But since avn relies on the reduce() method, which is not part of the ES6 Promise spec, it should probably force mz to use bluebird as its Promise implementation. Per https://www.npmjs.com/package/mz , the way to do this seems to be:
require('any-promise/register')('bluebird');
This may also need an update to mz 2.3.1
Hey!
I've installed nvm
& avn
& avn-nvm
. I get /usr/bin/env: node: No such file or directory
in the terminal when open a directory w/ .node-version
file presenting. I don't know how to solve this issue. I've tried to make a symlinks, but with no success.
which node # /home/serge/.nvm/versions/node/v4.0.0/bin/node
Please help me with this issue
avn.sh:8: missing end of string
The line looks fine to me but I'm not much a shell scripter, any idea what this is about?
I've just switched to zsh and am getting the following error when I load a directory with a .node_version file in it
__avn_chpwd:local:1: not valid in this context: Theatre/national-theatre-pp/.node-version
I have this in my .zshrc file (copied over from my .bashrc)
eval "$(rbenv init -)"
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
can anyone point me in the right direction?
When .nvmrc contains more than 1 line, e.g. with comments, then avn fails.
This is a problem because a code base I have to work with at work has extended .nvmrc with some additional lines for specifying the yarn version, which is used by a different tool. These extra lines are ignored by nvm, but cause an error in avn.
The simplest fix would be to only read the first line of the file and ignore everything else that follows.
i.e. In lib/hooks.js, change this line:
.then(function(version) { this.version = version.trim(); })
to this:
.then(function(version) { this.version = version.split('\n')[0].trim(); })
Details
The output of __avn_debug
in the directory with a .node-version
file is:
avn could not activate node 6.9.4
# test
error: no plugin passed predicate
avn-nvm: no version matching 6.9.4
# test
avn-n: no version matching 6.9.4
# test
avn
is loaded in my ~/.{bash|zsh}{_profile|rc}
file with:
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific
nvm
user I am confirming that I did not install with HomebrewYes.
instead of polluting home, provide env vars for avn like AVN_CONFIG_DIR or something and look in ~/.config/avn if .avn is not found in home folder
After installing, I'm getting this error. I ran npm install -g avn avn-nvm
and avn setup
. Then restarted the terminal
$ node -v
v0.10.36
$ cd my-project
avn could not activate node v0.12.0
$ cat .node-version
v0.12.0
$ nvm ls
iojs-v1.0.4
-> v0.10.36
v0.12.0
system
default -> v0.10.36
stable -> 0.12 (-> v0.12.0) (default)
Unfortunately, I'm not sure what other information I can provide.
I'm running zsh (oh-my-zsh)
The steps I took:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
(reopen terminal)nvm install 4.2.3
nvm alias default 4.2.3
(avn
explodes if there isn't a node
on the path)npm install -g avn avn-nvm
avn setup
(reopen terminal).node-version
with 4.2.3 to a directoryWe need to better handle .bashrc
vs .bash_profile
on different platforms.
See the conversation on #30.
If a parent directory has a .nvmrc and a child dir does too, avn will run both, starting w/ the child first.
I know this has been already discussed, but I am still bumping into this:
$ cd test/
avn could not activate node 5.12.0
$ cat .node-version
5.12.0
$ nvm list
v0.10.46
v0.12.15
v5.12.0
-> v6.5.0
default -> 6.5.0 (-> v6.5.0)
node -> stable (-> v6.5.0) (default)
stable -> 6.5 (-> v6.5.0) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.5.0 (-> N/A)
Details
0.2.3
v6.5.0
0.31.7
GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)
The output of __avn_debug
in the directory with a .node-version
file is:
avn could not activate node 5.12.0
error: no plugin passed predicate
avn-nvm: Bad argument
avn
is loaded in my ~/.bash_profile
file with:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific
nvm
user I am confirming that I did not install with HomebrewYou can see from the output below, i'm unable to successfully cd
to a dir and have it switch node versions. I tried with both a version I don't have installed via nvm yet (5.0) and one that I do (5.1) and same result.
$ cd myapp/
avn could not activate node 5.0
$ nvm ls
v5.1.0
-> system
default -> v5.1.0
node -> stable (-> v5.1.0) (default)
stable -> 5.1 (-> v5.1.0) (default)
iojs -> N/A (default)
$ node -v
v0.10.33
$ cd ../
$ cd myapp/
avn could not activate node 5.1
Please describe your issue clearly and also include all details below.
It is possibly to have a .nvmrc point at (for example lts/boron) This is currently not supported by avn.
Details
_avn --version: 0.2.3
node --version: nvm is working (without avn) so this kinda depends
nvm --version: 0..33.2
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
My directory does not have a .node_version file, uses .nvmrc. But the output of __avn_debug is:
avn could not activate node lts/boron
error: no plugin passed predicate
avn-nvm: no version matching lts/boron
avn-n: no version matching lts/boron
avn
is loaded in my ~/.bash_profile
file with:
nvm
user I am confirming that I did not install with HomebrewIt appears that avn
is a bit slow to change versions with nvm
. Both avn
and the nvm
switch are taking over one second on my system. The nvm
speed issue can be tracked at nvm-sh/nvm#926.
Updates above made by @wbyoung, original comment from @mockdeep:
nvm
is a little slow to switch node versions, so it would be nice ifavn
would check the current running version of node before triggering the switch. If it's already loaded, might as well avoid the work.
I'd want to clarify todo item
Support switching back to the previous version of node that you were using when you leave a directory.
I guess avn
should check $HOME
and /etc
locations for .node-version if there is none in current directory. It's the same way rvm
works and covers the most of wanted scenarios.
Details
0.2.3
v6.2.2
0.31.2
4.3.42(1)
The output of __avn_debug
in the directory with a .node-version
file is:
avn could not activate node default
error: no plugin passed predicate
avn-nvm: no version matching default
avn
is loaded in my ~/.{bash|zsh}{_profile|rc}
file with:
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific
nvm
user I am confirming that I did not install with HomebrewHow can we remove it? I cannot find a way to uninstall this tool. Since I cannot install it through homebrew this would discourage me from trying it.
Hi,
My mac had a .profile config. After installing AVN a lot of my things in shell got broken, because AVN created a .bash-profile file that did not exist before.
This lead to my .profile not being loaded anymore, leading to my $PATH being incorrect, my aliases not being created.
I think AVN should append to .profile if it exists, because creating .bash_profile will make bash to not load .profile file, making other apps unusable in the same time
Details
avn --version
: 0.2.3node --version
7.0.0nvm --version
0.32.1n --version
not foundzsh --version
5.0.8bash --version
3.2.57(1)In running multiple build tasks, I open up different terminal sessions and want to have avn keep using the same node version I was using in previous terminal sessions. Otherwise I have to run cd .
every time I open up a new session and want to switch to the correct node version that the directory specified. I'm using iTerm2 and zsh.
Hi, I have an issue where avn can't load the corrent version of node even though it is installed.
This is how it looks for me:
I've tried with and without v
prefix. And I know that has worked fine before. Also, just before creating the test here, I reinstalled avn
and avn-nvm
.
Any ideas what I should try?
This is a great project (if it would work).
I installed both avn packages but do not seem to get any binary. Is the distribution correct?
Here is some info:
➜ ember-components git:(master) ✗ npm install -g avn-nvm avn-n
[email protected] /usr/local/lib/node_modules/avn-n
├── [email protected]
└── [email protected]
[email protected] /usr/local/lib/node_modules/avn-nvm
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])
➜ ember-components git:(master) ✗ avn
zsh: command not found: avn
➜ ember-components git:(master) ✗ _avn
zsh: command not found: _avn
➜ ember-components git:(master) ✗ tree /usr/local/lib/node_modules/avn-n*
/usr/local/lib/node_modules/avn-n
├── README.md
├── index.js
├── node_modules
...
├── package.json
└── test
├── fixtures
│ └── n-prefix
│ └── n
│ └── versions
│ ├── 0.10.101
│ ├── 0.10.26
│ ├── 0.10.28
│ ├── 0.10.29
│ └── 0.11.13
└── tests.js
/usr/local/lib/node_modules/avn-nvm
├── LICENSE
├── README.md
├── index.js
├── node_modules
...
├── package.json
└── test
└── index.js
➜ ember-components git:(master) ✗ node --version
v0.10.33
➜ ember-components git:(master) ✗ npm --version
2.1.9
Anything I did wrong? Any help would be greatly appreciated.
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
0.2.3
v8.3.0
0.33.2
zsh 5.2 (x86_64-apple-darwin16.0)
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
nvm
user I am confirming that I did not install with HomebrewWe're working out details with rvm
on how to make this happen in a way that doesn't require each tool to have specific knowledge of another.
Using zsh, these dotfiles: https://github.com/aaronjensen/dotfiles
When I open a tmux split from a directory w/ a .nvmrc I get two activation messages. The first is in color, the second is not:
avn activated v0.10.26 via .nvmrc (avn-nvm v0.10.26)
avn activated v0.10.26 via .nvmrc (avn-nvm v0.10.26)
To repro, use my dotfiles:
$ tmux
$ cd <some dir w/ .nvmrc>
# Hit ctrl-o, v to open a split
Just what the title says. Trying to cd into a directory with a .node-version
file, or run __avn_debug
in that directory goes into an infinite loop for me. I've done it with an empty directory containing nothing but the .node-version
file. My primary shell is zsh, and I use oh-my-zsh
with it. I've reproduced the issue with both zsh and bash. I'm hoping this is just a setup problem on my part. Please let me know if there's something I'm doing wrong—my dotfiles setup is on github.
Thanks for your time.
Details
The output of __avn_debug
in the directory with a .node-version
file is:
# None, because any avn command goes into an infinite loop. Here's the output of ps while trying
# to cd into a directory with a .node-version file:
15326 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd --color /Users/ravasthi/code/avn-test .node-version
15327 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
15482 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
15483 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
15637 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
15638 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
15794 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
15796 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
15965 ttys004 0:00.17 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
15987 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
16143 ttys004 0:00.17 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
16166 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
16342 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
16348 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
16526 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
16527 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
16706 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
16708 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
16886 ttys004 0:00.15 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
16887 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17043 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
17065 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17236 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
17237 ttys004 0:00.08 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17414 ttys004 0:00.16 node /Users/ravasthi/.avn/bin/_avn chpwd /Users/ravasthi/code/avn-test .node-version
17416 ttys004 0:00.07 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17439 ttys004 0:00.00 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17442 ttys004 0:00.00 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17443 ttys004 0:00.00 /usr/local/bin/zsh -c source $NVM_DIR/nvm.sh; nvm list
17444 ttys004 0:00.00 tail -n1
Note that there are more processes the longer I wait before I run ps
.
avn
is loaded in my ~/.bashrc
file with:
if [[ -s "$HOME/.avn/bin/avn.sh" ]]; then
source "$HOME/.avn/bin/avn.sh"
fi
avn
is loaded in my ~/.zshenv
file with:
if [[ -s "$HOME/.avn/bin/avn.sh" ]]; then
source "$HOME/.avn/bin/avn.sh"
fi
nvm specific
nvm
user I am confirming that I did not install with HomebrewPlease describe your issue clearly and also include all details below.
Details
0.2.3
v7.4.0
0.31.1
GNU bash, versi'on 4.4.5(1)-release (x86_64-apple-darwin16.3.0)
avn
is loaded in my ~/.{bash|zsh}{_profile|rc}
file with:
~/.profile.d/extensions/avn
as in here
nvm specific
nvm
user I am confirming that I did not install with Homebrewavn-nvm
does not like having system
in my ~/.nvmrc
, it is specifically excluded Is there another way to make system
my default? I don’t want an nvm-managed node to be default, just to fall back to nvm use system
when not in a .node-version
controlled directory.
Documentation should explain the format for .node-version
or how to generate it.
$ cat .node-version
v4.0.0
------
$ _avn explain -v
error: missing required argument `path'
------
$ nvm --version
0.26.1
------
$ nvm list
iojs-v1.2.0
iojs-v2.3.0
iojs-v2.3.1
iojs-v2.3.3
iojs-v2.3.4
iojs-v2.4.0
-> iojs-v2.5.0
v4.0.0
default -> stable (-> v4.0.0)
node -> stable (-> v4.0.0) (default)
stable -> 4.0 (-> v4.0.0) (default)
iojs -> iojs-v2.5 (-> iojs-v2.5.0) (default)
------
$ node -v
v2.5.0
Include the following in the output of __avn_debug
automatically:
avn
, node
, and npm
nvm --version 2> /dev/null || echo "missing"
nvm
specifically, it should determine if it was installed improperly via homebrew
env
(or an abbreviated list)rvm
or autoenv
in any profile filesA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.