I have a js code that I want to run on a remote Ubuntu 16.04. And node -v is not showing the same results like nodejs -v. Well this happened after using npm update(the script I need to use asked for the most recent node version) I just need to update to the last version of node that will run my js

I don't have an issue with the installation, I'm not sure but somewhere else, I found that I should have used NVM to update to a new version first.

  • 3
    Possible duplicate of How to install the latest versions of NodeJS and NPM? – karel Jan 16 at 10:43
  • Reinstalling the latest versions of NodeJS and NPM does exactly the same thing as updating the existing versions. Not only that but if you install the node snap package, it has npm built-in and the node snap package is updated to the latest version automatically. It's not worse, it's better. – karel Jan 16 at 11:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.