HEY, Gorgeous people on the internet. Today, let's go through an article where the success rate of completing this task is close to 50%, which is installing NODEJS and NPM on an AWS EC2 Instance ๐๐.
Yes, you have read it right, I have seen many people on stack overflow complaining about this. So passengers pull up your seat belts let's do this and remove this problem from the AWS Community.
STEP 1:
After you have successfully launched your AWS EC2 Instance take the power of being the root user.
sudo su
IMPORTANT:
Make sure you are the root user while doing the below steps because the packages that you install now will only be accessed by the profiles that installed them.
STEP 2:
Copy this command and paste it into the terminal.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
Once you have done you will be seeing the message asking you to close the terminal. So enter this cmd.
exit
this brings you out of the root user. again put cmd
so that you will be disconnected from your ec2 instance and now the most important part.
#### IMPORTANT:
Close your terminal most people miss this and they get into some weird kind of errors.
After 20- 30 seconds try to connect your EC2 instance.
#### STEP 3:
Now again get root user power by
```sudo su
Now we need to activate the NVM
#### STEP 4:
Now Install the NODE
```nvm install 15.0.0
After running this command you will be seeing something like this...
And that is it you have successfully installed NodeJs and npm on the Ec2 Instance.
To confirm type this cmd in the terminal:
node -e "console.log('Running Node.js ' + process.version)"
and that's it we have successfully Installed Nodejs and Npm.
Conclusion:
And that is it my friend that's how you install Nodejs and NPM on Ec2 just like smooth like BUTTER ๐ง.