Ghost v4.1.0 is not compatible with this version of the CLI

I’m trying to update to Ghost 4.1.0 on an self hosted installation. I’ve used CLI to install it. When running ghost update I get this:

You are running an outdated version of Ghost-CLI. It is recommended that you upgrade before continuing. Run `npm install -g ghost-cli@latest` to upgrade.

+ sudo systemctl is-active ghost_94-130-108-202

✔ Checking system Node.js version
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version
✖ Downloading and updating Ghost to v4.1.0
A SystemError occurred.

Message: Ghost v4.1.0 is not compatible with this version of the CLI.

Debug Information:
OS: Ubuntu, v20.04.1 LTS
Node Version: v12.18.3
Ghost Version: 3.37.1
Ghost-CLI Version: 1.15.0
Environment: production
Command: 'ghost update'

Try running ghost doctor to check your system for known issues. Ghost admin interface in the browser shows me we're using version 3.42.2. 

When I run npm install -g ghost-cli@latest everything looks fine:

/usr/bin/ghost -> /usr/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.16.3
added 11 packages from 5 contributors, removed 25 packages and updated 41 packages in 22.401s

But when I check ghost version it’s still CLI 1.15.0. So it looks like updating CLI seems to be the problem?

While googling I also found this thread from the forum about a similar issue with version 2. They describe the same issue. I tried ghost update --v3 similarly to that thread, but it doesn’t work either and leads to the error from above.

Can anyone point me in the right direction to solve this?

Looking back at my zsh history, it looks like I had to update v3 first.

ghost update v3

Then I was able to run:

ghost update

Thanks! I somehow already managed to update to 3.42.4 directly. The Ghost-CLI update still doesn’t work. When trying to update to 4.0 it still fails because of the incompatibility. The issue really seems to be the npm update not working.

Ah, yes. I recall that I had to downgrade my node version since I happen to do several other things on the MacBook. v4 can use 14.16.0.

I use NVM to manage my NodeJS installation, check your version using

node --version

Then head over to NodeJS to download the proper version.

Check to ensure that you don’t have 2 versions on your system. I experienced something similar with CLI upgrade on bitnami - I think that this article references the issue Update the Ghost CLI

1 Like

Node is using Node 12, this should at least be supported.

node --version
v12.18.3

Do you mean two versions of npm or two versions of the Ghost-CLI?

When checking the npm version I was also told to update to npm 7.7.4 from 6.14.8, which I did. I then ran npm install -g ghost-cli@latest again and tried ghost update, but that didn’t change anything.

npm list -g shows me that ghost-cli 1.16.3 is installed though:

/usr/lib
├── ghost-cli@1.16.3
├── gulp-cli@2.3.0
├── npm@7.7.5
└── yarn@1.22.5

How can I be sure Ghost uses the right CLI version?

Ghost-CLI - I have gone through my notes and unfortunately cannot find anymore to add or help, only that I recall having similar issue when recently upgrading to V4 and in my case (from memory) had to ensure that correct version of Ghost-CLI updated and used.

1 Like

Try updating the Ghost CLI with Yarn and then running ghost update

sudo yarn global add ghost-cli@latest
ghost update

It worked for me.

2 Likes

That actually worked! Thank you!

2 Likes

Sweet. Glad to help.

1 Like

working with node 12

For me worked! Excellent! Thank You!