Ghost CLI Update issue

I just updated ghost-cli by using the following command,
npm install -g ghost-cli@latest

And successfully it showing,

/usr/bin/ghost -> /usr/lib/node_modules/ghost-cli/bin/ghost
/usr/lib
└── ghost-cli@1.7.3

But unfortunately when i am trying to update ghost it says,

Message: Ghost v1.23.0 is not compatible with this version of the CLI.

What’s the reason?

Picture attached.

1 Like

You probably have another version of ghost installed for some reason - you can find out by running whereis ghost - if the first location isn’t /usr/lib... then the version you just installed isn’t being ran

But the problem is CLI version unchanged after successfully update. I think it could be a bug

Did you get a chance to run the whereis command? If you look at the versions, the installed version is ghost-cli@1.7.3 and the debug output says the CLI version is 1.5.1 - The CLI version is programatically retreived retrieved based on the package file which must be updated with every release

/usr/bin/ghost /usr/local/bin/ghost

Here it is. What should i do now?

It looks like everything should be fine, but can you run

/usr/bin/ghost -v

and

/usr/local/bin/ghost -v and make sure the outputs differ"

root@server91:/home/cino/public_html# /usr/bin/ghost -v
Ghost-CLI version: 1.7.3
Ghost Version (at /home/cino/public_html): 1.21.4
root@server91:/home/cino/public_html# /usr/local/bin/ghost -v
Ghost-CLI version: 1.5.1
Ghost Version (at /home/cino/public_html): 1.21.4
root@server91:/home/cino/public_html#

it returning that. Ghost CLI version in 1.5.1 in /usr/local/bin/ghost there. But i am expecting both should be update

Unfortunately that’s the most I can help you from here, since it’s been a while since I debugged an issue like this.

However, a quick summary: you have 2 instances of the CLI installed for some reason. This could be because something simple such as having nvm installed as well as node, or something more complex. You need to figure out what caused the old version of the CLI to be installed and remove it.

1 Like

I think, i may remove both Ghost-CLI and then reinstall it again… That would work

Hello @themeix You can update your ghost using the following command
/usr/bin/ghost update from your ghost installation directory.
I suppose this has happened because you had a very old ghost cli version and the latest version did not replace the ghost cli on /usr/local/bin/ghost .

3 Likes

@themeix you can additionally fix this by following commands
mv /usr/local/bin/ghost /usr/local/bin/ghost2 && ln -s /usr/bin/ghost /usr/local/bin/ghost

2 Likes

Yes… it works… Both solution worked perfectly mate.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.