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

20 2

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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

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
Ahmad 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

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more