Updating Node for Ghost 5.47.0 Update on Digital Ocean

Updating Node for Ghost 5.47.0 Update on Digital Ocean

I recently ran into an issue while updating Ghost to the latest version 5.47.0.

When attempting to run ghost update I recived the following error message: Ghost v5.47.0 is not compatible with the current Node version. Your node version is 14.21.3, but Ghost v5.47.0 requires ^16.13.0 || ^18.12.1

Ghost v5.47.0 dropped support for Nodejs 14 which was previously used for Digital Ocean's 1 click Ghost installer droplets. So if you are hosting your ghost blog using one of those droplets you won't be able to update to the latest version of Ghost until you update to Node 16 or Node 18.

Node 18 is the latest LTS (Long term support) release for Node, so I decided to just jump straight to version 18.

All it takes is 2 commands:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

And then run

sudo apt-get install -y nodejs

To override your existing nodejs v14 install with nodejs v18.

Then you can run

node -v

to confirm you are now using node 18.

You can now finish updating Ghost to the latest version