NodeJS

Installing NodeJS and NPM

NPM and NodeJS used to be distributed separately in older versions, they are now bundled together. At the time of writing, there are version 8 LTS and version 10 flavours of Node.

You are free to use the LTS version if required.

Install version 10 repository

1
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

Install NPM and NodeJS

1
sudo yum install -y nodejs

Check installation success with

1
2
3
4
npm -v
# 6.1.0
node -v
# v10.6.0

NPM Install Error

If you encounter the following error:

npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference

You need to update OpenSSL

1
sudo yum update openssl