Paul2
January 30, 2024, 1:54pm
1
Hi,
I am currently using Ghost 5.66.0 but am unable to update to 5.78.0.
When i try to execute the ghost-update
function i am presented with a message:
Message: Ghost v5.78.0 is not compatible with the current Node version. Your node version is 16.15.0, but Ghost v5.78.0 requires ^18.12.1
I then try to use the sudo npm install -g ghost-cli@latest
command but get a error:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/ghost-cli
npm ERR! dest /usr/lib/node_modules/.ghost-cli-no3HtXlj
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/lib/node_modules/ghost-cli' -> '/usr/lib/node_modules/.ghost-cli-no3HtXlj'
I have had a look on Ghost documentation but am not able to find a resolution.
Step by step, learn how to install Node.js and NPM on a Debian 11 OS in this tutorial. Debian is easy to install with this guide.
Est. reading time: 5 minutes
Read this or find other tutorial to update Your node.
jannis
January 30, 2024, 2:02pm
3
Hey Paul!
You will need to upgrade your node version. As of a few months ago, only Node 18 is supported: Supported node versions for self-hosted installs of Ghost
Can you tell us how you installed node on your machine? Then we can point you in the right direction.
Paul2
January 30, 2024, 2:58pm
4
jannis:
de on your machine? Then
Thank you for this. I installed Node using my Mac on a Digital Ocean droplet.
OK, so it’s a Digital Ocean droplet. What operating system is it running? Ubuntu version what?
I’m going to suggest a somewhat goofy option, but I think it’s going to save you time. Deploy a new droplet with Node 18 installed, do an export on your content from within Ghost, and copy the images folder over.
I think it’s going to be easier than trying to upgrade in situ, especially if you aren’t very tech-y.
It also has the advantage that if things go badly, you can blow away the new droplet and still have the un-upgraded droplet intact to host your stuff while you try to figure out the problem.
2 Likes
jannis
January 30, 2024, 3:05pm
6
I see. You will need to log into your DigitalOcean droplet and update NodeJS there.
I assume you are using the one-click installation there? Then this should work for you:
The DigitalOcean one-click App uses nodesource.
I recommend updating to Node v10 (v8 is almost end of life)
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
ghost update --force
One you’ve updated node, you must run ghost update --force in the ghost directory, this will force Ghost to update its dependencies to match Node v10, otherwise you’ll get more errors.
Replace the setup_10.x
with setup_18.x