I am attempting to update the Node version to the latest supported version at the time of writing; v18. I have followed the instructions exactly step by step. However, despite this, it installed v20.9.0 instead and I can't find a way to downgrade it to the supported v18 so I can go ahead with the the Ghost updates.
I am running Ghost on an Ubuntu 22.04 LTS server.
It's really strange as well because although when running the command node -v
it displays that I have managed to upgrade it to v18. However, as you can see in the screenshot below when I try to the run ghost update
, I get the following error message.
I followed the instructions on the official documentation here: https://ghost.org/docs/faq/node-versions/
I'll have to admit that a while ago i ran into similar issues. The number one thing is to ensure you are running a supported LTS version of
nodejs
.In my case i didnt and also dont run Ghost on recommended Ubuntu but on CentOS stream.
I'll write/paste below my actions, you'll want to convert them to the Ubuntu/dpkg equivalent.
Cleanup
As you can see i have the wrong versions enabled
Install
I got a warning about an npm update, which didnt want to install, but thats 'fine' with me for now :)
Install ghost
npm install ghost-cli@latest -g
Ghost blog
Be sure to be the
web-user
whichever you use and be in the ghostblog websites pathAnd its all done.