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

A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.41.0: The engine "cli" appears to be invalid.
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
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.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-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.27.0"
warning Resolution field "@tryghost/logging@2.0.4" is incompatible with requested version "@tryghost/logging@2.0.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...

Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v16.14.2
Ghost Version: 4.40.0
Ghost-CLI Version: 1.18.2
Environment: production
Command: ‘ghost update -v’

Yup I had the same issue. Looks like it happens when using Nodejs 16 and ARM. If you use x86 you shouldn’t have a problem, or downgrade to node 14. I’ve been using a T4g instance for now, and might just move to T3 for now cause I have no experience with fixing this.

Here’s my complete dump

Message: Command failed: yarn install --no-emoji --no-progress                    warning ghost@4.41.0: The engine "cli" appears to be invalid.                     warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"                                                                    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.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-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.27.0"                                                                     warning Resolution field "@tryghost/logging@2.0.4" is incompatible with requested version "@tryghost/logging@2.0.1"                                                 warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"                                                                     warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"                                                                    warning Error running install script for optional dependency: "/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3: Command failed.                             Exit code: 1                                                                      Command: node-pre-gyp install --fallback-to-build                                 Arguments:                                                                        Directory: /var/www/ghostsite/versions/4.41.0/node_modules/sqlite3                Output:                                                                           node-pre-gyp info it worked if it ends with ok                                    node-pre-gyp info using node-pre-gyp@0.11.0                                       node-pre-gyp info using node@16.14.2 | linux | arm64                              node-pre-gyp WARN Using request for node-pre-gyp https download                   node-pre-gyp info check checked for \"/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node\" (not found)       node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz                                                         node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz                                                         node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz                                     node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.2 and node@16.14.2 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)              node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz                         gyp info it worked if it ends with ok                                             gyp info using node-gyp@3.8.0                                                     gyp info using node@16.14.2 | linux | arm64                                       gyp info ok                                                                       gyp info it worked if it ends with ok                                             gyp info using node-gyp@3.8.0                                                     gyp info using node@16.14.2 | linux | arm64                                       gyp ERR! configure error                                                          gyp ERR! stack Error: Can't find Python executable \"python\", you can set the PYTHON env variable.                                                                 gyp ERR! stack     at PythonFinder.failNoPython (/var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/lib/configure.js:484:19)                                  gyp ERR! stack     at PythonFinder.<anonymous> (/var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/lib/configure.js:406:16)                                   gyp ERR! stack     at F (/var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/node_modules/which/which.js:68:16)                                                gyp ERR! stack     at E (/var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/node_modules/which/which.js:80:29)                                                gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/node_modules/which/which.js:89:16                                                    gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/index.js:42:5                                                                           gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/mode.js:8:5                                                                             gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)                   gyp ERR! System Linux 5.13.0-1019-aws                                             gyp ERR! command \"/usr/bin/node\" \"/var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node\" \"--module_name=node_sqlite3\" \"--module_path=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64\" \"--napi_version=8\" \"--node_abi_napi=napi\" \"--napi_build_version=3\" \"--node_napi_label=napi-v3\"                                                                  gyp ERR! cwd /var/www/ghostsite/versions/4.41.0/node_modules/sqlite3              gyp ERR! node -v v16.14.2                                                         gyp ERR! node-gyp -v v3.8.0                                                       gyp ERR! not ok                                                                   node-pre-gyp ERR! build error                                                     node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)                                                                        node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/ghostsite/versions/4.41.0/node_modules/node-pre-gyp/lib/util/compile.js:83:29)                    node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:526:28)             node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)                                                              node-pre-gyp ERR! System Linux 5.13.0-1019-aws                                    node-pre-gyp ERR! command \"/usr/bin/node\" \"/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"                                                                            node-pre-gyp ERR! cwd /var/www/ghostsite/versions/4.41.0/node_modules/sqlite3     node-pre-gyp ERR! node -v v16.14.2                                                node-pre-gyp ERR! node-pre-gyp -v v0.11.0                                         node-pre-gyp ERR! not ok                                                          Failed to execute '/usr/bin/node /var/www/ghostsite/versions/4.41.0/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/ghostsite/versions/4.41.0/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)"                    error /var/www/ghostsite/versions/4.41.0/node_modules/re2: Command failed.        Exit code: 1                                                                      Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || npm run rebuild                                                           Arguments:                                                                        Directory: /var/www/ghostsite/versions/4.41.0/node_modules/re2                    Output:                                                                           Trying https://github.com/uhop/node-re2/releases/download/1.17.4/linux-arm64-93.br ...                                                                              Trying https://github.com/uhop/node-re2/releases/download/1.17.4/linux-arm64-93.gz ...                                                                              Building locally ...                                                                                                                                                > re2@1.17.4 rebuild                                                              > node-gyp rebuild                                                                                                                                                  gyp info it worked if it ends with ok                                             gyp info using node-gyp@8.4.1                                                     gyp info using node@16.14.2 | linux | arm64                                       gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"      gyp info spawn /usr/bin/python3                                                   gyp info spawn args [                                                             gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py',                                                  gyp info spawn args   'binding.gyp',                                              gyp info spawn args   '-f',                                                       gyp info spawn args   'make',                                                     gyp info spawn args   '-I',                                                       gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/build/config.gypi',                                                                      gyp info spawn args   '-I',                                                       gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp/addon.gypi',                                                       gyp info spawn args   '-I',                                                       gyp info spawn args   '/home/ghostuser/.cache/node-gyp/16.14.2/include/node/common.gypi',                                                                           gyp info spawn args   '-Dlibrary=shared_library',                                 gyp info spawn args   '-Dvisibility=default',                                     gyp info spawn args   '-Dnode_root_dir=/home/ghostuser/.cache/node-gyp/16.14.2',  gyp info spawn args   '-Dnode_gyp_dir=/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp',                                                   gyp info spawn args   '-Dnode_lib_file=/home/ghostuser/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',                                                            gyp info spawn args   '-Dmodule_root_dir=/var/www/ghostsite/versions/4.41.0/node_modules/re2',                                                                      gyp info spawn args   '-Dnode_engine=v8',                                         gyp info spawn args   '--depth=.',                                                gyp info spawn args   '--no-parallel',                                            gyp info spawn args   '--generator-output',                                       gyp info spawn args   'build',                                                    gyp info spawn args   '-Goutput_dir=.'                                            gyp info spawn args ]                                                             gyp ERR! build error                                                              gyp ERR! stack Error: not found: make                                             gyp ERR! stack     at getNotFoundError (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:10:17)                                                       gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:57:18                                                                          gyp ERR! stack     at new Promise (<anonymous>)                                   gyp ERR! stack     at step (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:54:21)                                                                   gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:71:22                                                                          gyp ERR! stack     at new Promise (<anonymous>)                                   gyp ERR! stack     at subStep (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:69:33)                                                                gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:80:22                                                                          gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/index.js:42:5                                                                           gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/mode.js:8:5                                                                             gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)                   gyp ERR! System Linux 5.13.0-1019-aws                                             gyp ERR! command "/usr/bin/node" "/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"                                         gyp ERR! cwd /var/www/ghostsite/versions/4.41.0/node_modules/re2                  gyp ERR! node -v v16.14.2                                                         gyp ERR! node-gyp -v v8.4.1                                                       gyp ERR! not ok                                                                   node:internal/process/promises:279                                                            triggerUncaughtException(err, true /* fromPromise */);                            ^                                                                                                                                                       [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1".] {                     code: 'ERR_UNHANDLED_REJECTION'                                                 }                                                                                                                                                                   > re2@1.17.4 rebuild                                                              > node-gyp rebuild                                                                                                                                                  gyp info it worked if it ends with ok                                             gyp info using node-gyp@8.4.1                                                     gyp info using node@16.14.2 | linux | arm64                                       gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"      gyp info spawn /usr/bin/python3                                                   gyp info spawn args [                                                             gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py',                                                  gyp info spawn args   'binding.gyp',                                              gyp info spawn args   '-f',                                                       gyp info spawn args   'make',                                                     gyp info spawn args   '-I',                                                       gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/build/config.gypi',                                                                      gyp info spawn args   '-I',                                                       gyp info spawn args   '/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp/addon.gypi',                                                       gyp info spawn args   '-I',                                                       gyp info spawn args   '/home/ghostuser/.cache/node-gyp/16.14.2/include/node/common.gypi',                                                                           gyp info spawn args   '-Dlibrary=shared_library',                                 gyp info spawn args   '-Dvisibility=default',                                     gyp info spawn args   '-Dnode_root_dir=/home/ghostuser/.cache/node-gyp/16.14.2',  gyp info spawn args   '-Dnode_gyp_dir=/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/node-gyp',                                                   gyp info spawn args   '-Dnode_lib_file=/home/ghostuser/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',                                                            gyp info spawn args   '-Dmodule_root_dir=/var/www/ghostsite/versions/4.41.0/node_modules/re2',                                                                      gyp info spawn args   '-Dnode_engine=v8',                                         gyp info spawn args   '--depth=.',                                                gyp info spawn args   '--no-parallel',                                            gyp info spawn args   '--generator-output',                                       gyp info spawn args   'build',                                                    gyp info spawn args   '-Goutput_dir=.'                                            gyp info spawn args ]                                                             gyp ERR! build error                                                              gyp ERR! stack Error: not found: make                                             gyp ERR! stack     at getNotFoundError (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:10:17)                                                       gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:57:18                                                                          gyp ERR! stack     at new Promise (<anonymous>)                                   gyp ERR! stack     at step (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:54:21)                                                                   gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:71:22                                                                          gyp ERR! stack     at new Promise (<anonymous>)                                   gyp ERR! stack     at subStep (/var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:69:33)                                                                gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/which/which.js:80:22                                                                          gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/index.js:42:5                                                                           gyp ERR! stack     at /var/www/ghostsite/versions/4.41.0/node_modules/isexe/mode.js:8:5                                                                             gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)                   gyp ERR! System Linux 5.13.0-1019-aws                                             gyp ERR! command "/usr/bin/node" "/var/www/ghostsite/versions/4.41.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"                                         gyp ERR! cwd /var/www/ghostsite/versions/4.41.0/node_modules/re2                  gyp ERR! node -v v16.14.2                                                         gyp ERR! node-gyp -v v8.4.1                                                       gyp ERR! not ok                                                                                                                                                     yarn install v1.22.15                                                             [1/5] Validating package.json...                                                  [2/5] Resolving packages...                                                       [3/5] Fetching packages...                                                        info fsevents@2.3.2: The platform "linux" is incompatible with this module.       info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.                                                     [4/5] Linking dependencies...                                                     [5/5] Building fresh packages...                                                  info This module is OPTIONAL, you can safely ignore this error                    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.                                                                                                                                                              Exit code: 1                                                                                                                                                                                                                                          Debug Information:                                                                    OS: Ubuntu, v20.04.4 LTS                                                          Node Version: v16.14.2                                                            Ghost-CLI Version: 1.18.2                                                         Environment: production                                                           Command: 'ghost install'

I have downgraded to node 14.19.1 and still have this problem.

A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.41.3: The engine "cli" appears to be invalid.
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
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.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-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.27.0"
warning Resolution field "@tryghost/logging@2.1.1" is incompatible with requested version "@tryghost/logging@2.0.4"
warning Resolution field "@tryghost/logging@2.1.1" is incompatible with requested version "@tryghost/logging@2.0.4"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
[13:49:58] → verbose 24.382371605 Copying "/home/username/.cache/yarn/v6/npm-date-fns-2.28.0-9570d656f5fc13143e50c975a3b6bbeb46cd08b2-integrity/node_modules/date-fns/locale/sl/_lib/formatLong/index.js" to "/var/www/domaincom/versions/4.41.3/node_modules/date-fns/locale/sl/_lib/formatLong/index.js".
[13:50:02] Installing dependencies [failed]
[13:50:02] → stdout maxBuffer exceeded
[13:50:02] Downloading and updating Ghost to v4.41.3 [failed]
[13:50:02] → stdout maxBuffer exceeded
A ProcessError occurred.

Message: stdout maxBuffer exceeded

Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v16.14.2
    Ghost Version: 4.40.0
    Ghost-CLI Version: 1.19.2
    Environment: production
    Command: 'ghost update -V'

Fixed: 1 GB RAM was not enough.