Yarn error when i install ghost local

Hi, I tried to download ghost to local but every time I take this error :

✔ Checking system Node.js version - found v16.13.1
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✖ Downloading and installing Ghost v4.32.1
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress

Unknown Syntax Error: Unsupported option name ("--no-emoji").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]

Exit code: 1


Debug Information:
    OS: Ubuntu, v20.04.3 LTS
    Node Version: v16.13.1
    Ghost-CLI Version: 1.18.1
    Environment: development
    Command: 'ghost install local'

I saw in GitHub to change the yarn version to older but nothing happened. I tried to download an older version of ghost but I take the same error.

1 Like

Hello I am also getting the same problem as listed above.

$ ghost install local
:heavy_check_mark: Checking system Node.js version - found v16.13.2
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for latest Ghost version
:heavy_check_mark: Setting up install directory
:heavy_multiplication_x: Downloading and installing Ghost v4.32.2
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress

Unknown Syntax Error: Unsupported option name ("–no-emoji").

$ yarn install [–json] [–immutable] [–immutable-cache] [–check-cache] [–inline-builds] [–mode #0]

Exit code: 1

Debug Information:
OS: Ubuntu, v20.04.3 LTS
Node Version: v16.13.2
Ghost-CLI Version: 1.18.1
Environment: development
Command: ‘ghost install local’

The version of yarn being used does not support the --no-emoji flag

Just a fyi, in lib/tasks/yarn-install.js

I changed the following line from:
const args = ['install', '--no-emoji', '--no-progress'];
to
const args = ['install'];

and was able to get it to work:
:heavy_check_mark: Checking system Node.js version - found v16.13.2
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for latest Ghost version
:heavy_check_mark: Setting up install directory
:heavy_check_mark: Downloading and installing Ghost v4.32.2
:heavy_check_mark: Finishing install process
:heavy_check_mark: Configuring Ghost
:heavy_check_mark: Setting up instance
:heavy_check_mark: Starting Ghost

Ghost uses direct mail by default. To set up an alternative email method read our docs at Configuration - Adapt your publication to suit your needs


Ghost was installed successfully! To complete setup of your publication, visit:

http://localhost:2368/ghost/

Happy to push a merge request for this change if it suits the developers.

I’ve created a PR for this fix here: fix(install): remove non-existent flags by Paladiamors · Pull Request #1591 · TryGhost/Ghost-CLI · GitHub

I edited ghost-cli package yesterday but I wasn’t sure if I should delete completely these 2 and if it is a proper way to make it run. Btw thank you very much for the update :grin:

An update for this way, I tried to delete the ‘–no-emoji’ and ‘–no-progress’ but now I take this error.

Debug Information:
    OS: Ubuntu, v20.04.3 LTS
    Node Version: v16.13.1
    Ghost-CLI Version: 1.18.1
    Environment: development
    Command: 'ghost install local'
Message: Command failed: yarn install

Hmmm, interesting. Was there any message that came out after that offers any hints? One of the developers started responding to my merge request so hopefully will get some more color about the issue.

Yes, there is an enormous list of the installation progress I think. I can paste it here but it is almost 16 thousand lines. I do not know if this is helpful or important but tried to make the installation on windows 11 but it show me the same error. I use subsystem and wanted to be sure that there is no problem with my system. I paste a link with the log file if you wanna see it:

Interesting from the logs you posted there was:

Migrating from Yarn 1; automatically enabling the compatibility node-modules linker

Maybe you’re on an old version of yarn?
The error I get in my case is that I’m running on yarn 3.1.1, maybe ghost is expecting to run on yarn 2.x.x

That was the problem, I just change the version using this command yarn set version 2.0.0-rc.30 but on the last part, it doesn’t find some modules and throw an error. For the first three modules, I install them with npm and it seems it works. I think it is a permission problem but I will investigate it a little bit and I will update you. Thank you for your help!!!

1 Like

I think I found the solution. Everything works perfectly with yarn 1.22.1. If you run this command yarn set version 1.22.1 and then install ghost with ghost-cli everything works, there is no error either with the flags or with the modules.

✔ Checking system Node.js version - found v16.13.1
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v4.32.2
✔ Finishing install process
✔ Configuring Ghost
✔ Setting up instance
✔ Starting Ghost

Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/config/#mail

------------------------------------------------------------------------------

Ghost was installed successfully! To complete setup of your publication, visit:

    http://localhost:2368/ghost/

Ok wow interesting, fascinated that things work with yarn 1.22.1.My yarn version is much more recent but I think there is some clarity needed with setting up the correct yarn version. I’ll see if something like that helps on my side too

1 Like