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

:heavy_check_mark: Checking system Node.js version - found v16.17.1
: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 v5.34.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@5.34.0: The engine “cli” appears to be invalid.
warning Resolution field “@elastic/elasticsearch@8.5.0” is incompatible with requested version “@elastic/elasticsearch@8.6.0”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@^2.29.1”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.29.1”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@^2.27.0”
warning Resolution field “moment-timezone@0.5.23” is incompatible with requested version “moment-timezone@^0.5.31”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.29.4”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.29.4”
warning Resolution field “moment-timezone@0.5.23” is incompatible with requested version “moment-timezone@0.5.34”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.29.1”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.29.3”
warning Resolution field “@tryghost/logging@2.4.0” is incompatible with requested version “@tryghost/logging@2.3.6”
warning Resolution field “moment-timezone@0.5.23” is incompatible with requested version “moment-timezone@^0.5.33”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@2.27.0”
warning Resolution field “@tryghost/logging@2.4.0” is incompatible with requested version “@tryghost/logging@2.3.6”
warning Resolution field “@tryghost/logging@2.4.0” is incompatible with requested version “@tryghost/logging@2.3.6”
warning Resolution field “moment@2.24.0” is incompatible with requested version “moment@^2.29.1”
warning “@tryghost/kg-lexical-html-renderer > @lexical/rich-text@0.7.9” has unmet peer dependency “@lexical/selection@0.7.9”.
warning “@tryghost/kg-lexical-html-renderer > @lexical/rich-text@0.7.9” has unmet peer dependency “@lexical/utils@0.7.9”.
warning " > bookshelf@1.2.0" has incorrect peer dependency “knex@>=0.15.0 <0.22.0”.
warning " > mock-knex@0.4.9" has incorrect peer dependency “knex@> 0.8 < 2.1”.
warning Workspaces can only be enabled in private projects.
node:events:491
throw er; // Unhandled ‘error’ event
^

Error: read ENOTCONN
at tryReadStart (node:net:638:20)
at Socket._read (node:net:649:5)
at Socket.Readable.read (node:internal/streams/readable:487:10)
at Socket.read (node:net:705:39)
at new Socket (node:net:425:12)
at Object.Socket (node:net:295:41)
at createSocket (node:internal/child_process:328:14)
at ChildProcess.spawn (node:internal/child_process:445:23)
at Object.spawn (node:child_process:713:9)
at /home2/kunchana/nodevenv/ghost/16/lib/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:25732:24
Emitted ‘error’ event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -107,
code: ‘ENOTCONN’,
syscall: ‘read’
}

yarn install v1.22.19
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
[4/5] Linking dependencies…
[5/5] Building fresh packages…

Exit code: 1

Debug Information:
OS: unknown, vunknown
Node Version: v16.17.1
Ghost-CLI Version: 1.24.0
Environment: development
Command: ‘ghost install local’

Additional log info available in: /home2/kunchana/.ghost/logs/ghost-cli-debug-2023-02-15T16_20_52_524Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to Ghost-CLI - A fully loaded tool for installation and configuration for troubleshooting.

Most likely, you’re running an incompatible Yarn version.

Please run yarn --version.

Hey,
I have the exact same issue, trying to install on a new server.
Debian 11 (also tried on Ubuntu 20.04 & Ubuntu 22.04 with same results)
Node.js v16.9.1 (also tried node v18 with same results)
NPM 9.5.0
Yarn 1.22.19
Ghost release v5.35.0 (also tried older releases v5.30.0 v5.25.0 with similar results)

ghost-cli hangs at one point. CPU goes into idle and process never stops.

✔ Checking system Node.js version - found v16.19.1
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
☲ Downloading and installing Ghost v5.35.0 > Installing dependencies > info This module is OPTIONAL, you can safely ignore this error

When killing the process, going into ghostinstall/versions/5.35.0 directory and running yarn install,
im getting the above mentioned error.

Any ideas?

I’m was having the exact same issue. I have tried lots of different versions including Ubuntu 18.04 & Ubuntu 20.04 & Ubuntu 22.04 and the same issue each time. I think the issue was being caused by trying to install on a arm based server. As soon as I tried an Intel/AMD processor it worked fine.