I have a problem with ghost-cli!
Ghost report it’s not running the last version of Ghost-CLI
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
npm install -g ghost-cli@latest to upgrade.
**I have try to run
sudo npm install -g ghost-cli@latest but it doesn’t update the version to the last version (1.7.3)
I have also try to run
sudo npm i -g firstname.lastname@example.org - Dont work!
Go to your ghost install dir. My dir is: /var/www/ghost
sudo npm install -g ghost-cli@latest
Then it will tell you the ghost-cli is outdated
Ghost version: 4.6.4 (at /var/www/ghost)
Ghost-CLI version: 1.17.1
Node Version: v14.17.0
Browser/OS: Brave V1.25.68
Database: Mysql Ver 8.0.25-0ubuntu0.20.04.1
Any help will be really nice
How did you originally install the CLI? If you installed with yarn it might be overtaking the npm installation. Run
whereis ghost to see if there are multiple references to it
@vikaspotluri123 - Thanks for your reply
Here is the commands i used to install node.js
# Add the NodeSource APT repository for Node 14
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash
# Install Node.js
sudo apt-get install -y nodejs
Then i run:
npm install -g ghost-cli@latest
If I run
whereis ghost i get this
ghost-mgr@s1:~$ whereis ghost
ghost: /usr/bin/ghost /usr/local/bin/ghost
I don’t used “yarn”
Looking forward to hearing from you
EDIT: Can the error be something related to my post: Node v. 14.16.1 makes warnings
You can see that there are 2 versions of Ghost installed when running
What happens when you run
ls -l /usr/bin/ghost /usr/local/bin/ghost?
Thanks for you reply
When i run “ls -l /usr/bin/ghost /usr/local/bin/ghost” i get
lrwxrwxrwx 1 root root 39 Jun 3 15:51 /usr/bin/ghost → …/lib/node_modules/ghost-cli/bin/ghost
lrwxrwxrwx 1 root root 39 May 11 19:37 /usr/local/bin/ghost → …/lib/node_modules/ghost-cli/bin/ghost
hmm… can you uninstall the cli (
npm uninstall -g ghost-cli) and see what the output of
whereis ghost is?
Sure… I have uninstalled ghost with the command provided…
When i run “whereis ghost” i get this
So that shows that the cli was installed some other way. Can you run:
npm list -g --depth=0 and
sudo npm list-g --depth=0? Only one of the commands should be run with sudo
npm list -g --depth=0
If i run: npm list -g --depth=0 i get
ghost-mgr@s1:~$ npm list -g --depth=0
If i run: sudo npm list-g --depth=0 i get this:
ghost-mgr@s1:~$ sudo npm list-g --depth=0
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/ghost-mgr/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open ‘/home/ghost-mgr/package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-03T17_42_08_551Z-debug.log
Your sudo command is missing a space -
list -g not
Are you using n for node version management?
Sorry my bad
ghost-mgr@s1:~$ sudo npm list -g --depth=0
[sudo] password for ghost-mgr:
Are you using
n for node version management? That might be causing issues. Can you also run
sudo yarn global list and
yarn global list just to be safe?
Just an update
After a long night, trying to get it to work, I decided to reinstall my server, and now it works fine…
I don’t not know what the problem was, but works now
@vikaspotluri123 for trying to help me.