loading...
Cover image for How to install Node.js in Manjaro Linux

How to install Node.js in Manjaro Linux

lobo_tuerto profile image Víctor Adrián Originally published at lobotuerto.com on ・1 min read

You can check the latest updated version of this article at lobotuerto's notes - How to install Node.js in Manjaro Linux.


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 latest from the 9 series:

nvm install 9
node -v #v9.8.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

Posted on by:

lobo_tuerto profile

Víctor Adrián

@lobo_tuerto

Fullstack Developer — Specializing Generalist — UI Engineering ⚫ Elixir, Phoenix, Javascript, Vue.js, Material Design, D3, HTML, CSS ⚫ Gamedev/VR/ComputerArt hobbyist ⚫ Aspiring Zen Buddhist

Discussion

pic
Editor guide
 

Great article dude!

Just a typo at the beginning: pacman -S nvm
I think that also sudo will be required.

Cheers!