BarelyFunctional

BarelyFunctional

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

outputs:

% 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?

Most Liked

tme_317

tme_317

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: GitHub - asdf-vm/asdf-nodejs: Node.js plugin for asdf version manager · GitHub

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.

BarelyFunctional

BarelyFunctional

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>

Where Next?

Popular in Questions Top

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49084 226
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement