Search code examples
node.jsasdf-vm

asdf doesn't install nodejs


Any help please. I'm not sure what I did, but I can't install or run nodejs using asdf.

$ asdf install nodejs 6.12.3
nodejs 6.12.3 is already installed
$ node
nodejs 6.9.4 not installed
$ which node
/home/sam/.asdf/shims/node

I have no clue. It says that is install but it does not run. Greetings.


Solution

  • You need to update the default node version from 6.9.4 (not installed as per the error message) to the installed version 6.12.3. You can do this using the nvm alias command. If you don't have nvm installed, you can start here.


    > nvm alias default 6.12.3
    > node -v
    6.12.3