Hello everyone, I’m giving a try to Q&A since this community looks awesome. I state that I am no ubuntu expert, and I’ve been following (surprisingly successfull!) many tutorials to set up my droplet till now. I wanted to update my nodejs to the latest lts version (currently 10.13.0) and I thought of doing so with nvm. So i installed it, and got the version I wanted, everything seem okay, but I’m worried cause of different output version:
node -v
v10.13.0
nodejs -v
v8.10.0
Did I miss something? Should I uninstall nodejs with sudo apt remove nodejs - since I am now using nvm?
Thanks for helping out, good coding to you all ✨
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Both /usr/bin/node and /usr/bin/nodejs are provided by the nodejs package in Ubuntu which is currently version 8.10.0 in Ubuntu’s repositories.
Meanwhile, NVM provides the latest LTS, 10.13.0.
This does indeed sound like /usr/bin/node is from the NVM version whereas /usr/bin/nodejs is from the Ubuntu version.
Personally, rather than use NVM, I’d recommend Node’s officially recommended Ubuntu packages. That way there won’t be any conflicts with the Ubuntu version. Alternatively, you could uninstall the Ubuntu version then reinstall the NVM version.
I’d rather use nvm to be able to switch node version with ease if I needed to, I’m used to nvm working locally so I’d really love to stick with it! From what you said I understand that right now I have 2 “instances” of node installed? To keep it clean using nvm I should uninstall nodejs ubuntu version? I was assuming that nvm would have “took control” of the nodejs version that was already there instead of adding another one on top. I just want to be sure I’m not uninstalling the nodejs I am using right now… How can I be sure which one my apps are actually running on? 😕
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.