How to install nodejs and npm? (404)

How to install nodejs and npm and generally software to manjaro? Ok, I found "snap" to install a few programs like vs code. But how to install node js and npm?

You'll say: use pacman. Ok, great. But I get 404 erros. -.-

sudo pacman -S nodejs npm

Result:

Pakete (6) c-ares-1.15.0-1  libuv-1.30.1-1  node-gyp-5.0.2-1  semver-6.3.0-1  nodejs-11.15.0-1  npm-6.10.2-1

Fehler: Konnte Datei 'npm-6.10.2-1-any.pkg.tar.xz' nicht von manjaro.telecoms.bg übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'npm-6.10.2-1-any.pkg.tar.xz' nicht von mirrors.gigenet.com übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'npm-6.10.2-1-any.pkg.tar.xz' nicht von www.caco.ic.unicamp.br übertragen : The requested URL returned error: 404

I'm looking for a more working solution to install software. Do you recommend a package installer? Like apt-get or snap.

You need to update your system first. Partial updates are not support.

You can do it with one command

sudo pacman -Syu nodejs npm

You have to update the mirrors first.

sudo pacman-mirrors -f5 && sudo pacman -Syyu

Then try it again.

Spare yourself of a lot of grief and frustration - use nvm to manage a local instance of nodejs. This also makes it possible to install tools globally using npm -g - without the need for sudo - which IMO is extremely valuable.

Ok, thanks guys. I'll try it ...

btw. I'm a newbie more or less. I worked with linux before, but I'm not a pro.
I prefer hackless working and installing apps with the OS. I'm interessted in Linux and I try it again and again. Sad to see that Linux is still a hacking OS. Sounds exaggerated. But in short words it's describes the truth.
Linux should have an app management like OS X and Windows workflow. I am impartial. I'm not a OS X or Windows cultist. I only evaluate my experience. :slight_smile:

e.g. I have no idea what is "nvm" and how to use. But I'll check out the link on github u posted. thanks.