How to Switch from nodenv to asdf for managing Node Versions
ADR-0081 recommends using asdf for both Node and Go. Many folks are likely using nodenv today, and have the option to migrate at a time of their choosing.
This guide assumes you already have asdf installed (for Go). If not, install asdf first.
Uninstall nodenv
$ brew uninstall nodenv
Remove nodenv references from your shell profile file (e.g.
.zshrc
). You likely have aeval "$(nodenv init -)"
there.Install the asdf nodejs plugin
asdf plugin add nodejs
Ensure project tool versions for the project are installed, by running the following from inside the project directory.
asdf install
Within mymove-docs, this will install the correct version of node. Within mymove, this will install the correct version of go and node.
ASDF will automatically use the version(s) defined in
.tool-versions
whenever you are in a directory that has a.tool-versions
file, so long as it has been installed, just like nodenv.