- Install node.js
- Install npm (manage node.js package)
libuv1 is old version, we can't use apt-get install nodejs.
Solution: add libuv1 apt-get repository.
sudo add-apt-repository ppa:acooks/libwebsockets6
sudo add-apt-repository ppa:gias-kay-lee/npm
sudo apt-get update
sudo apt-get install libuv1
sudo apt-get install nodejs
sudo apt-get install npm
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum -y install nodejs
To compile and install native addons from npm you may also need to install build tools:
sudo yum install gcc-c++ make
# or: sudo yum groupinstall 'Development Tools'