Node error when upgrading from 2.36.0

Hi,

I’m running a self-hosted old version of Ghost (2.36.0), and I’m trying to upgrade it to the newest one. The ghost CLI tool recommends me to first upgrade to the last 2.x version with ghost update v2, so that’s what I’m attempting to do now.

My system node version is 12.22.10, but I’m using nvm so I can easily switch.

If I’m trying to run ghost update using node 10.13.0, I’m getting the following error:

Message: The version of Node.js you are using is not supported.
Supported: ^12.22.1 || ^14.17.0 || ^16.13.0
Installed: 10.13.0
See https://ghost.org/docs/faq/node-versions/ for more information

Debug Information:
    OS: Ubuntu, v18.04.3 LTS
    Node Version: v10.13.0
    Ghost Version: 2.36.0
    Ghost-CLI Version: 1.18.2
    Environment: production
    Command: 'ghost update v2'

So I try again with the one that’s supposed to be supported (12.22.1). Then I get the following:

✖ Downloading and updating Ghost to v2.38.3
A SystemError occurred.

Message: Ghost v2.38.3 is not compatible with the current Node version. Your node version is 12.22.1, but Ghost v2.38.3 requires ^8.10.0 || ^10.13.0

Debug Information:
    OS: Ubuntu, v18.04.3 LTS
    Node Version: v12.22.1
    Ghost Version: 2.36.0
    Ghost-CLI Version: 1.18.2
    Environment: production
    Command: 'ghost update v2'

What can I do to make it run?

I suggest you downgrade node to one of these.

Thanks for the reply. As I mentioned in my post, I already tried with node v10.13.0 and it failed.

I suspect the issue is that your version of ghost requires no higher than v10, but the version of ghost-cli needs min. of v12.

Your option may be to export the database and rebuild.

It looks like you’re running into something similar to this issue:

Can you try the solution and see if it works?