Anyone here have trouble installing nodejs via asdf?

I’m only asking here as I’ve switched to using asdf today, and erlang and elixir have installed successfully.

I’ve installed 3 different versions of nodejs and set a global version as follows.

asdf list-all nodejs

asdf install nodejs 8.4.0

echo -e 'nodejs 8.4.0' >> ~/.tool-versions

My ~/.tool-versions looks like this:

erlang 20.0
elixir 1.4.4
nodejs 8.4.0

Yet, when it should report that it’s installed when I do:

asdf current nodejs

it returns an error:

version 8.0 is not installed for nodejs

And if I try to install it (again):

asdf install nodejs 8.4.0


% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4756    0  4756    0     0   3942      0 --:--:--  0:00:01 --:--:--  3943

But when I test if it’s installed:

asdf list nodejs

output is:

No versions installed

I’ve seen this, but can’t find a fix: Install broken on OS X

This is holding up a new phoenix project I want to build, so would appreciate any help, thanks.

How have you fixed this?


Hi @BarelyFunctional,

I did have a problem similar to this a few months ago… I don’t remember the exact steps I used to resolve but it has to do with the need to import the gpg keyring for the release team as described here:

You will need gpg installed installed and configured first… which I installed using homebrew. Once I followed the gpg instructions and installed the keyring everything worked great. Hope this helps.


Thanks tme_317!

I saw the gpg instructions but they failed, even after I adjusted the path to asdf that homebrew uses, but didn’t know I had to install gpg as I assumed the instructions failed because I was using homebrew not installing via git.

For anyone else installing asdf via homebrew, make sure to:

first install gpg

brew search gpg

brew install gpg

then modify the instructions from the github asdf-nodejs page to where homebrew has installed asdf (check the path below is correct first):

bash /usr/local/opt/asdf/plugins/nodejs/bin/import-release-team-keyring

And you should be able to

asdf install nodejs <version>