0

After launching an ec2 Ubuntu 16.04 instance on AWS, I have both:

apt-get install nodejs

and:

apt-get install node.js

Both are runnable but each shows different disk usage. Which should be the correct one to install Node.js? (Why are there two? How different are they?)

2 Answers 2

1

After adding required PPA file you should write sudo apt-get install nodejs to install node.js

This will allow you to easily install modules and packages to use with node.js

Because of a conflict with another package, the executable from the Ubuntu repositories is called nodejs instead of node. Keep this in mind as you are running software.

ref: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04

Sign up to request clarification or add additional context in comments.

Comments

1

I would suggest installing nvm: It removes loads of the issues relating to installing via package manager

https://github.com/creationix/nvm

you can then use the command nvm list to get the versions of node available then use command nvm install <version> to install a specific version, then nvm use <version> to use that version for what you are doing. e.g.

nvm install 8.1.2 && nvm use 8.1.2

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.