How to install Node.js in Manjaro Linux

Published on 2018/03/10 ‚óŹ Last updated on 2018/06

Table of contents

Installation process

Install asdf

Version managers rule in dev environments.
So we will install Node.js using asdf.

Clone the GitHub repository:

git clone ~/.asdf --branch v0.5.0

Add some lines to your .profile and .bashrc files:

echo -e '\n. $HOME/.asdf/' >> ~/.profile
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc

Make changes effective with:

source ~/.profile
exec $SHELL

We add to .profile and not to .bashrc, because it will have the side effect of allowing applications started through dmenu —for i3 users— to have the node command available.

This is because stuff in .profile gets loaded when you login into your account, so anything there will be available to commands run through dmenu or desktop icons.

But, stuff in .bashrc gets loaded everytime you open a terminal —so another solution, would be to just start code from the CLI.

Install Node.js

Let’s install the latest release of node:

asdf plugin-add nodejs
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring

asdf list-all nodejs
asdf install nodejs 10.4.0
asdf global nodejs 10.4.0

Add the Yarn package manager globally:

npm install -g yarn

If you are a Vue.js fan —and why shouldn’t you be one? :)— install vue-cli:

yarn global add @vue/cli
# After installing a global package with Yarn, you need to:
asdf reshim nodejs

Now you can create a new Vue.js project with:

vue create my-new-project


— lt

Feedback & comments

Get in touch on Twitter

Or by good ol' email at