Reputation: 499
In my Ubuntu machine, I am attempting to update my version of Node. I run curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
then I run sudo apt-get install -y nodejs
After this, my version of node remains unchanged:
ubuntu:~$ node -v
v6.10.3
Upvotes: 0
Views: 264
Reputation: 499
Running this worked for me finally.
Uninstall:
sudo apt-get purge nodejs
sudo apt-get autoremove
nvm deactivate
nvm uninstall node_version
(Source)
Install the New Version:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
If there are errors here, run these 2:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
wget -qO - https://raw.githubusercontent.com/yarnpkg/releases/gh-pages/debian/pubkey.gpg | sudo apt-key add -
Install New Version of Node:
wget -qO - https://raw.githubusercontent.com/yarnpkg/releases/gh-pages/debian/pubkey.gpg | sudo apt-key add -
Upvotes: 1
Reputation: 31
use nvm, a version manager for node
https://github.com/creationix/nvm
To download node you install nvm and type nvm install <version>
This will download both node and npm
To change which node version you want to use you type nvm use <version>
For more detail check out the repo ^^
Upvotes: 2