Explained in terminal, I have installed a version of nodejs using asdf, but the terminal only sees the other version:
> asdf list
nodejs
12.18.3
> nodejs --version
v8.10.0
> asdf global nodejs 12.18.3
> nodejs --version
v8.10.0
Have added the following to the top of .zshrc
. $HOME/.asdf/asdf.sh
export PATH=$HOME/.asdf/asdf.sh:$PATH
Have reloaded .zshrc
> source ~/.zshrc
There are no local files which are setting the local version to 8.10.0.
How do I get nodejs --version
to give me the version that asdf acknowledges as the global version?
asdf install nodejs 12.18.3
? – Irvingirwinasdf install
and the.tool-versions
file has the nodejs version in it. Does that make a difference? – Subchloride.tool-versions
file is in that directory with global defaults sets as$HOME/.tool-versions
? – Irvingirwintype -a nodejs
return for you? It sounds like you've got your system node taking precedence over everything managed by asdf. The asdf directories need to come first in your$PATH
. – Henselnodejs is /usr/bin/nodejs
three times. When I doecho $PATH
I get/usr/local/opt/[email protected]/bin:/home/joe/.asdf/shims:/home/joe/.asdf/bin:
etc, so asdf is first – Subchloride