DEV Community 👩‍💻👨‍💻

Cover image for How to install Node.js in Manjaro Linux
Víctor Adrián
Víctor Adrián

Posted on • Originally published at lobotuerto.com on

How to install Node.js in Manjaro Linux


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
Enter fullscreen mode Exit fullscreen mode

Then on your terminal:

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

To list all available versions for Node.js :

nvm ls-remote
Enter fullscreen mode Exit fullscreen mode

Let’s install latest from the 9 series:

nvm install 9
node -v #v9.8.0
npm -v #5.6.0
Enter fullscreen mode Exit fullscreen mode

Add the Yarn package manager globally:

npm install -g yarn
Enter fullscreen mode Exit fullscreen mode

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

In a terminal:

echo 'export PATH=$PATH:~/.yarn/bin' >> ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

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

yarn global add vue-cli
Enter fullscreen mode Exit fullscreen mode

Links

Top comments (5)

Collapse
 
lil5 profile image
Lucian I. Last
pacman -S nodejs npm
Enter fullscreen mode Exit fullscreen mode

What are your opinions on using the nodejs package from the community repository?

As date of comment (2021-09-29), the last build was of 2021-09-03.

Collapse
 
alligatore3 profile image
Mattia Zanella

Great article dude!

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

Cheers!

Collapse
 
salihcodev profile image
Ahmed Salih

pacman & pacaur is totally the same, pacaur is just a helper :)

Collapse
 
alligatore3 profile image
Mattia Zanella

Wow! didn't know about that. Thanks!

Collapse
 
dennyabbaszain profile image
Denny Abbas Zain

thanks, Great article sirr

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. 🛠