# Yarn error upon Ghost Update

**URL:** <https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894>\
**Category:** Installation\
**Created:** [February 1, 2021, 8:49pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894 "2021-02-01T20:49:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WatsonJH](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@WatsonJH](https://forum.ghost.org/u/WatsonJH)\
**Post date:** [February 1, 2021, 8:49pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894/1 "2021-02-01T20:49:15Z")

</div>

Hi everyone,

I tried to update Ghost from 3.40.5 to the latest version (3.41.3), but I encountered an error.

I first ran `sudo npm install -g ghost-cli@latest` to update Ghost-CLI, then I ran `ghost update` while being in the Ghost folder as usual.

And I ended up with the following:

> - sudo systemctl is-active ghost\_ghost-site  
> ✔ 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
> 
> - 🐛 Fixed default urls for checkout session - Rishabh Garg
> 
> * * *
> 
> View the changelogs for full details:
> 
> - Ghost - [Comparing 3.41.2...3.41.3 · TryGhost/Ghost · GitHub](https://github.com/tryghost/ghost/compare/3.41.2...3.41.3)
> - Ghost-Admin - [Comparing 3.41.2...3.41.3 · TryGhost/Admin · GitHub](https://github.com/tryghost/admin/compare/3.41.2...3.41.3)
> 
> ✔ Fetched release notes  
> ✖ Downloading and updating Ghost to v3.41.3  
> A ProcessError occurred.
> 
> Message: Command failed: yarn install --no-emoji --no-progress  
> Usage: yarn [options]
> 
> yarn: error: no such option: --no-emoji
> 
> Exit code: 2
> 
> Debug Information:  
> OS: Ubuntu, v20.04.2 LTS  
> Node Version: v10.19.0  
> Ghost Version: 3.40.5  
> Ghost-CLI Version: 1.15.3  
> Environment: production  
> Command: ‘ghost update’
> 
> Additional log info available in: /home/ghostuser/.ghost/logs/ghost-cli-debug-2021-02-01T20\_32\_23\_186Z.log
> 
> Try running ghost doctor to check your system for known issues.

I ran `ghost doctor`, but it did not help, it passes all tests.  
This is the log file produced after the failure:

> Debug Information:  
> OS: Ubuntu, v20.04.2 LTS  
> Node Version: v10.19.0  
> Ghost Version: 3.40.5  
> Ghost-CLI Version: 1.15.3  
> Environment: production  
> Command: ‘ghost update’  
> Message: Command failed: yarn install --no-emoji --no-progress  
> Usage: yarn [options]
> 
> yarn: error: no such option: --no-emoji
> 
> Exit code: 2
> 
> --------------- stderr ---------------  
> Usage: yarn [options]
> 
> yarn: error: no such option: --no-emoji

I tried allowing more RAM to the VM but not luck.  
I tried to look up the error online, but what I found did not help much.

---

<div class="post-metadata">

**Author:** ![WatsonJH](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@WatsonJH](https://forum.ghost.org/u/WatsonJH)\
**Post date:** [February 1, 2021, 10:12pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894/2 "2021-02-01T22:12:02Z")

</div>

If I uninstall yarn, I then get:

> Message: spawn yarn ENOENT  
> Exit code: ENOENT

Looking for this error code usually means not enough swap memory, but I think I have enough based on this output:

> ```
> total used free shared buff/cache available
> 
> ```
> 
> Mem: 1.9Gi 683Mi 537Mi 1.0Mi 765Mi 1.1Gi  
> Swap: 1.9Gi 0B 1.9Gi

So I am not sure what the issue is. I had no problem updating Ghost prior to this time.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [February 1, 2021, 11:11pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894/3 "2021-02-01T23:11:59Z")

</div>

> `error: no such option: --no-emoji`

That’s the pertinent error. It’s possible you had a too-old, or too-new version of `yarn` installed. Can you try re-installing `yarn` then retry and post an update to this issue? [Message: Command failed: yarn install --no-emoji --no-progress · Issue #1335 · TryGhost/Ghost-CLI · GitHub](https://github.com/TryGhost/Ghost-CLI/issues/1335)

---

<div class="post-metadata">

**Author:** ![WatsonJH](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@WatsonJH](https://forum.ghost.org/u/WatsonJH)\
**Post date:** [February 2, 2021, 2:39pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894/4 "2021-02-02T14:39:13Z")

</div>

Thanks @Kevin.  
I reinstalled yarn using `sudo apt-get install yarn`, and ran `ghost update` and ended up with the same output as before with the `--no-emoji` thing.

The command to install yarn, also said that it installed _cmdtest_ instead of yarn.

I posted an update to the issue you linked.

---

<div class="post-metadata">

**Author:** ![WatsonJH](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@WatsonJH](https://forum.ghost.org/u/WatsonJH)\
**Post date:** [February 2, 2021, 9:06pm UTC](https://forum.ghost.org/t/yarn-error-upon-ghost-update/19894/5 "2021-02-02T21:06:18Z")

</div>

Just to close the loop here since it continued on the github page.

I was running a very old version of yarn and for some reason, Ubuntu was not installing a new one.  
@Kevin pointed me to [this article](https://classic.yarnpkg.com/en/docs/install#debian-stable) where all the instructions to install a recent version of yarn is.

I uninstalled my old version and ran the 2 commands below:

```auto
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

```

and then

```auto
sudo apt update && sudo apt install yarn

```

and finally, `ghost update` worked.  
Thank you for your help 🙂
