# Ghost-CLI wont update from 1.17.1 to 1.17.3!

**URL:** <https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217>\
**Category:** Developer help\
**Created:** [June 2, 2021, 6:17pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217 "2021-06-02T18:17:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 2, 2021, 6:17pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/1 "2021-06-02T18:17:26Z")

</div>

Hi,

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.  
> Run `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 ghost-cli@1.17.3` - Dont work!

### To Reproduce

1. Go to your ghost install dir. My dir is: /var/www/ghost
2. Run: `sudo npm install -g ghost-cli@latest`
3. Run `ghost update`
4. Then it will tell you the ghost-cli is outdated

### Technical details:

- 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 :)**

Regards

Taxick @ [https://www.futurenode.dk](https://www.futurenode.dk/)

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 2, 2021, 9:21pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/2 "2021-06-02T21:21:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 9:41am UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/3 "2021-06-03T09:41:00Z")

</div>

Hi @vikaspotluri123 - Thanks for your reply 🙂

**Here is the commands i used to install node.js**

```auto
# 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](https://forum.ghost.org/t/node-v-14-16-1-makes-warnings/22641)  
Thanks

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 3, 2021, 3:35pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/4 "2021-06-03T15:35:40Z")

</div>

You can see that there are 2 versions of Ghost installed when running `whereis ghost`

What happens when you run `ls -l /usr/bin/ghost /usr/local/bin/ghost`?

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 5:18pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/5 "2021-06-03T17:18:19Z")

</div>

> [@vikaspotluri123](#):
>
> ls -l /usr/bin/ghost /usr/local/bin/ghost

Hi…

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

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 3, 2021, 5:26pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/6 "2021-06-03T17:26:12Z")

</div>

hmm… can you uninstall the cli (`npm uninstall -g ghost-cli`) and see what the output of `whereis ghost` is?

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 5:33pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/7 "2021-06-03T17:33:33Z")

</div>

> [@vikaspotluri123](#):
>
> whereis ghost

Hi 🙂

Sure… I have uninstalled ghost with the command provided…

When i run “whereis ghost” i get this

“ghost: /usr/local/bin/ghost”

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 3, 2021, 5:39pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/8 "2021-06-03T17:39:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 5:42pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/9 "2021-06-03T17:42:39Z")

</div>

> [@vikaspotluri123](#):
>
> npm list -g --depth=0

Hi 🙂

**If i run: npm list -g --depth=0 i get**

ghost-mgr@s1:~$ npm list -g --depth=0  
/usr/lib  
├── n@7.2.2  
└── npm@6.14.13

**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

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 3, 2021, 5:59pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/10 "2021-06-03T17:59:01Z")

</div>

Your sudo command is missing a space - `list -g` not `list-g` 😉

Are you using n for node version management?

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 6:00pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/11 "2021-06-03T18:00:13Z")

</div>

Sorry my bad 🙂

ghost-mgr@s1:~$ sudo npm list -g --depth=0  
[sudo] password for ghost-mgr:  
/usr/lib  
├── n@7.2.2  
└── npm@6.14.13

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [June 3, 2021, 6:17pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/12 "2021-06-03T18:17:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 3, 2021, 6:19pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/13 "2021-06-03T18:19:05Z")

</div>

Im not using “n” :)

> ghost-mgr@s1:~$ sudo yarn global list  
> sudo: yarn: command not found

> ghost-mgr@s1:~$ yarn global list  
> Command ‘yarn’ not found, but can be installed with:  
> sudo apt install cmdtest

---

<div class="post-metadata">

**Author:** ![Taxick](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/taxick/32/10960_2.png) [@Taxick](https://forum.ghost.org/u/Taxick)\
**Post date:** [June 4, 2021, 2:19pm UTC](https://forum.ghost.org/t/ghost-cli-wont-update-from-1-17-1-to-1-17-3/23217/14 "2021-06-04T14:19:39Z")

</div>

Hi.

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 🙂

Thanks to @vikaspotluri123 for trying to help me.

// Thomas
