Sometimes you need to install a Node.js version that is not available in the official ASDF plugin (because node-build lacks the definition or the version was never added). This guide explains how to manually add a custom node-build definition so ASDF can install any Node.js version β including legacy or unreleased ones.
asdf list-all nodejs | grep 20.18If your version does not appear (e.g., 20.18.1), proceed with the manual definition. The all builds are in "https://nodejs.org/dist/.
Run:
find ~/.asdf/plugins/nodejs -type d -name "node-build"This returns the path where node-build definitions are stored.
Example output:
/Users/<user>/.asdf/plugins/nodejs/.node-build/share/node-build
Copy that path β youβll use it next.
Navigate to the node-build folder:
cd <PASTE_THE_PATH_HERE>/share/node-buildCreate a new file named after the version you want:
nano 20.18.1If you're on Apple Silicon (arm64), you must use the ARM tarball:
install_package "node-v20.18.1-darwin-arm64" "https://nodejs.org/dist/v20.18.1/node-v20.18.1-darwin-arm64.tar.xz#sha256=SKIP"If you're on Intel, replace with:
install_package "node-v20.18.1-darwin-x64" "https://nodejs.org/dist/v20.18.1/node-v20.18.1-darwin-x64.tar.xz#sha256=SKIP"Nano:
CTRL + O β ENTER β CTRL + X
asdf install nodejs 20.18.1If the definition is correct, ASDF will download the binary from nodejs.org and install it normally.
node -vOutput:
v20.18.1
You have successfully installed a Node.js version that ASDF didn't officially support.