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 8 repository¶
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
Redacted
Install version 10 repository¶
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
Install NPM and NodeJS¶
sudo yum install -y nodejs
Install for MacOSX¶
curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest-v8.x/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
Check installation success with
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
sudo yum update openssl