Closed hubitor closed 5 years ago
That’s because you didn’t install nvm separately. The nvm-init
thing you mentioned, i have no idea what that is.
Like I mentioned, I've installed the nvm package from the AUR (https://aur.archlinux.org/packages/nvm/ and this includes a script:
/usr/share/nvm/init-nvm.sh
.
with this content:
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
source /usr/share/nvm/nvm.sh
source /usr/share/nvm/bash_completion
source /usr/share/nvm/install-nvm-exec
avn works fine for me now. I just opened the issue in case the developers see something strange and want to improve or someone else encounters this issue and might find this info useful.
There's no issue here — installing nvm
is documented to only be acceptable in one way. The fact that there's a .node-version
file in the .avn
directory is technically unnecessary. I don't recall writing code to have that added there, but I have one on my machine, too. It won't affect how anything operates, though. It just suggests that you should develop avn
with that version of Node.js.
I just installed avn with:
After that I did:
and I got an error like this (I didn't copy it...):
parse error in line 134 of ~/.avn/bin/anv.sh
Then I restarted my system and did a __avn_debug with this output:
Indeed there wasn't such file. I found this line in the file: ~/.avn/plugins/avn-nvm/index.js
which I changed to:
(I'm using Arch Linux based distro and I have installed nvm from the AUR)
Now __avn_debug gives me:
After this change avn seems to be working.
Besides that when I change into this folder: /home/user/.avn I get this message:
I don't understand why I'm getting this message in this folder. I have only installed v8.12.0 with nvm:
Details
avn --version
0.2.3node --version
v10.12.0nvm --version
n --version
0.33.11zsh --version
zsh 5.6.2 (x86_64-pc-linux-gnu)bash --version
GNU bash, version 4.4.23(1)-release (x86_64-unknown-linux-gnu)The output of
__avn_debug
in the directory with a.node-version
file is: See aboveavn
is loaded in my~/.{bash|zsh}{_profile|rc}
file with:nvm specific
nvm
user I am confirming that I did not install with Homebrew