How to Upgrade node version from 6.X to 8.X?


#1

Ghost recommends to use node 8.X version. Can someone let me know how to upgrade node from 6.x to 8.X?

Also, is it really necessary to upgrade node version right now?


#2

As long as you’re using a supported node version you don’t need to do anything. The reason 8.x is recommended is because Ghost (Pro) runs it, so the likliness for errors in 8.x is reduced, but 6.x is perfectly acceptable.

Upgrading node is pretty easy (if you want to) - you just need to tell apt (your package manager) that you’re using node v8 instead of v6 -

run curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - to do so. As always, you’re running code that someone else wrote on your system; be careful!

Then just run sudo apt-get update && sudo apt-get install -y nodejs and you should be up to date!

You might need to upgrade npm by running sudo npm i -g npm


#3

Should I purge Node 6 first? and if, yes, which directory needs to deleted in order to install new node version?


#4

Nope, you’re just updating node so apt will handle it


#5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.