4

After installing node via npm , using 'nvm ls' gives the version which i have installed like v8.9.4 and also node -v also shows the version. But at the same time, when checking for 'nodejs --version' tells me to install node js as 'sudo apt-get install nodejs'.

2

1 Answer 1

4

Via npm or nvm Node.js is called node but if you install via apt-get you need to use the package name nodejs because via apt-get node is a package name take by a completely different application that happens to also be called node.

what are the differences between node.js and node?

3
  • Right now I have installed both via NVM and via 'sudo apt-get install nodejs'
    – Addictd
    Jan 30, 2018 at 4:17
  • Will their be any issue in future?
    – Addictd
    Jan 30, 2018 at 4:17
  • I would remove one. Its easier to track your version when you know which one is being ran because theres only one. The issue I run into when I have multiple versions of node is when something tries calling node and uses the wrong one so for me I only use one. Jan 30, 2018 at 4:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.