How To Install Latest Nodejs on Amazon Linux AMI
- Add Node.js Yum Repository
First of all, You need to enable node.js yum repository in your system provided by the Node.js official website. You also need development tools to build native add-ons to be installed on your system. - For Latest Release
yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -
- For Stable Release
yum install -y gcc-c++ make curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
- Lets Install
yum install nodejs
- Check Node.js and NPM Version
node -v npm -v