Installing Node.js and NPM on Manjaro Linux
Since Manjaro is based on Arch, we can surely use pacman to install node.js and npm. But true freedom of npm can be easily enjoyed without needing root access all the time. Here is how to do it:
- Install nvm – Node Version Manager
1$ yaourt -S nvm - Load nvm
1$ source /usr/share/nvm/init-nvm.sh - Install Node.js and npm
1$ nvm -g install npm - Test your setup – open a new terminal and install a package using npm
123$ nvm use stable$ nvm -g install browser-sync$ browser-sync start --server
Congratulations.
If you are trying to install nvm and you don’t have
yaourt
, just do this:1) open “Add/remove software”
2) in the search bar (there is a search button in the top left corner) type “nvm”
3) on the first result, click the “Build” button and click “Apply” on the bottom of the window
4) click apply again and wait for it to finish. After this, you can proceed to next steps from this tutorial.