How to install Node.js in Manjaro Linux

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

Table of contents

Installation process

Version managers rule in dev environments.
So we will install Node.js through nvm.

Install the nvm package from the AUR:

pacaur -S nvm

Then on your terminal:

echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.bashrc
exec $SHELL

To list all available versions for Node.js:

nvm ls-remote

Let’s install the latest release of node:

nvm install node
nvm use node
nvm alias default node
node -v #v10.0.0
npm -v #5.6.0

Add the Yarn package manager globally:

npm install -g yarn

We need to add Yarn’s binary to our $PATH in ~/.bashrc.
In a terminal:

echo 'export PATH=$PATH:~/.yarn/bin' >> ~/.bashrc

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

yarn global add vue-cli

Links


— lt

Feedback & comments

Get in touch on Twitter

Or by good ol' email at adriandcs@gmail.com