Cannot install Ghost locally on Mac OS X - ghost-cli incompatibility?

I’m trying to install Ghost locally (have done this a year or so ago successfully) but am stuck.

node --version
v18.18.2
nvm --version
0.39.5
npm --version
9.8.1

ghost --version
Ghost-CLI version: 1.25.3

And this is where things go pear-shaped …

ghost install local

It is recommended that you upgrade before continuing.
Run `npm install -g ghost-cli@latest` to upgrade.


✔ Checking system Node.js version - found v18.18.2
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✖ Downloading and installing Ghost v5.105.0
A SystemError occurred.

Message: Ghost v5.105.0 is not compatible with this version of the CLI. Your CLI version is 1.25.3, but Ghost v5.105.0 requires ^1.26.0
Help: Run `npm install -g ghost-cli@latest` to upgrade the CLI, then try again.

Debug Information:
    OS: macOS, v14.7
    Node Version: v18.18.2
    Ghost-CLI Version: 1.25.3
    Environment: development
    Command: 'ghost install local'

So I attempt to update ghost-cli …
npm install -g ghost-cli@latest

npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

changed 596 packages in 45s

But ghost-cli is not updated as
ghost --version
still returns Ghost-CLI version: 1.25.3

This should not be this difficult, and when I originally did it, wasn’t.

Any ideas?

As an aside, and perhaps unrelated, when I upgraded node to v20.18.1 the ghost installation fails claiming that node is incompatible … which it should not be, based upon my reading of the documents where 20.x is recommended.

It sounds like you have multiple versions of the cli installed. You can run whereis ghost to confirm.

1 Like

I’ve found using nvm on Mac greatly reduces the misery caused by node versioning. One of the benefits - in addition to being able to switch easily between node versions - is that when it makes it easy to check the global package version (e.g ghost-cli) is installed with the active node version, e.g nvm use v20; which ghost ; ghost --version

2 Likes

Thanks @vikaspotluri123 and @NickAbs … I thought I’d used nvm (and definitely have it installed), but whereis ghost tells me I have a homebrew copy lurking somewhere. Time to roll my sleeves up and sort out $PATH.

2 Likes