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

Hello there, whenever I am trying to update my ghost version on my DigitalOcean Droplet, I get this error that no matter what I do won’t go away. I’ve attempted to force the installation to continue, but this error continues.

Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v16.13.0
Ghost Version: 4.36.3
Ghost-CLI Version: 1.18.1
Environment: production
Command: ‘ghost upgrade’
Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.39.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 “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.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…

--------------- stdout ---------------
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…

--------------- stderr ---------------
warning ghost@4.39.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 “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.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”

Any amount of help would be appreciated, thank you so much.

Just thought I’d note, ghost doctor didn’t log anything. Everything seemed normal there

What version of yarn are you using?

Hey there,

yarn --version
1.22.17

You could try yarn cache clean.

Hey there,

Now I’m having a different problem. yarn cache clean worked successfully, and upon upgrading it updated yarn. It claims the installation was a success, but now when I go to start the blog it just keeps saying it’s loading but isn’t. Cloudflare shows a 502 Bad Gateway.

As usual, ghost doctor is useless and shows nothing. Attempted to roll-back, and that fails.

Sharing console output would be helpful. Furthermore, the output of ghost ls.

Hey there,
after letting it attempt to start it came out with this:

Ghost instance is not running! Starting…

  • sudo systemctl start ghost_blog-schoolfactsonline-com
  • sudo systemctl stop ghost_blog-schoolfactsonline-com
    :heavy_multiplication_x: Starting Ghost
    A GhostError occurred.

Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_blog-schoolfactsonline-com -n 50

Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v16.13.0
Ghost Version: 4.39.0
Ghost-CLI Version: 1.18.2
Environment: production
Command: ‘ghost restart’

Additional log info available in: /home/star/.ghost/logs/ghost-cli-debug-2022-03-12T20_56_56_584Z.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.

ghost ls:

star@schoolfactsonline:/var/www/blog$ ghost ls

  • sudo systemctl is-active ghost_blog-schoolfactsonline-com
  • sudo systemctl reset-failed ghost_blog-schoolfactsonline-com
    ┌────────────────────────────┬───────────────┬─────────┬─────────┬─────┬──────┬─────────────────┐
    │ Name │ Location │ Version │ Status │ URL │ Port │ Process Manager │
    ├────────────────────────────┼───────────────┼─────────┼─────────┼─────┼──────┼─────────────────┤
    │ blog-schoolfactsonline-com │ /var/www/blog │ 4.39.0 │ stopped │ n/a │ n/a │ n/a │
    └────────────────────────────┴───────────────┴─────────┴─────────┴─────┴──────┴─────────────────┘
    star@schoolfactsonline:/var/www/blog$

Use the logs etc. to identify the issue.

Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v16.13.0
Ghost Version: 4.39.0
Ghost-CLI Version: 1.18.2
Environment: production
Command: ‘ghost restart’
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_blog-schoolfactsonline-com -n 50
Stack: Error: Could not communicate with Ghost
at Server. (/usr/local/lib/node_modules/ghost-cli/lib/utils/port-polling.js:91:20)
at Object.onceWrapper (node:events:509:28)
at Server.emit (node:events:390:28)
at emitCloseNT (node:net:1681:8)
at processTicksAndRejections (node:internal/process/task_queues:82:21)

This is in the log file.

Got more information for you,

journalctl -u ghost_blog-schoolfactsonline-com -n 50 gives me:

star@schoolfactsonline:/var/www/blog$ sudo journalctl -u ghost_blog-schoolfactsonline-com -n 50
– Logs begin at Sat 2021-07-17 16:25:49 UTC, end at Sat 2022-03-12 21:08:49 UTC. –
Mar 12 20:52:02 schoolfactsonline node[2337]: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)
Mar 12 20:52:02 schoolfactsonline node[2337]: at Module.load (internal/modules/cjs/loader.js:950:32)
Mar 12 20:52:02 schoolfactsonline node[2337]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Mar 12 20:52:02 schoolfactsonline node[2337]: at Module.require (internal/modules/cjs/loader.js:974:19) {
Mar 12 20:52:02 schoolfactsonline node[2337]: code: ‘MODULE_NOT_FOUND’,
Mar 12 20:52:02 schoolfactsonline node[2337]: requireStack: [
Mar 12 20:52:02 schoolfactsonline node[2337]: ‘/var/www/blog/versions/4.39.0/core/server/overrides.js’,
Mar 12 20:52:02 schoolfactsonline node[2337]: ‘/var/www/blog/versions/4.39.0/core/boot.js’,
Mar 12 20:52:02 schoolfactsonline node[2337]: ‘/var/www/blog/versions/4.39.0/ghost.js’,
Mar 12 20:52:02 schoolfactsonline node[2337]: ‘/var/www/blog/versions/4.39.0/index.js’
Mar 12 20:52:02 schoolfactsonline node[2337]: ]
Mar 12 20:52:02 schoolfactsonline node[2337]: }
Mar 12 20:52:02 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Succeeded.
Mar 12 20:52:02 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Scheduled restart job, restart counter is at 4.
Mar 12 20:52:02 schoolfactsonline systemd[1]: Stopped Ghost systemd service for blog: blog-schoolfactsonline-com.
Mar 12 20:52:02 schoolfactsonline systemd[1]: Started Ghost systemd service for blog: blog-schoolfactsonline-com.
Mar 12 20:52:03 schoolfactsonline node[2373]: - Inspecting operating system
Mar 12 20:52:03 schoolfactsonline node[2373]: internal/modules/cjs/loader.js:905
Mar 12 20:52:03 schoolfactsonline node[2373]: throw err;
Mar 12 20:52:03 schoolfactsonline node[2373]: ^
Mar 12 20:52:03 schoolfactsonline node[2373]: Error: Cannot find module ‘luxon’
Mar 12 20:52:03 schoolfactsonline node[2373]: Require stack:
Mar 12 20:52:03 schoolfactsonline node[2373]: - /var/www/blog/versions/4.39.0/core/server/overrides.js
Mar 12 20:52:03 schoolfactsonline node[2373]: - /var/www/blog/versions/4.39.0/core/boot.js
Mar 12 20:52:03 schoolfactsonline node[2373]: - /var/www/blog/versions/4.39.0/ghost.js
Mar 12 20:52:03 schoolfactsonline node[2373]: - /var/www/blog/versions/4.39.0/index.js
Mar 12 20:52:03 schoolfactsonline node[2373]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Function.Module._load (internal/modules/cjs/loader.js:746:27)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Module.require (internal/modules/cjs/loader.js:974:19)
Mar 12 20:52:03 schoolfactsonline node[2373]: at require (internal/modules/cjs/helpers.js:101:18)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Object. (/var/www/blog/versions/4.39.0/core/server/overrides.js:8:15)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Module.load (internal/modules/cjs/loader.js:950:32)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Mar 12 20:52:03 schoolfactsonline node[2373]: at Module.require (internal/modules/cjs/loader.js:974:19) {
Mar 12 20:52:03 schoolfactsonline node[2373]: code: ‘MODULE_NOT_FOUND’,
Mar 12 20:52:03 schoolfactsonline node[2373]: requireStack: [
Mar 12 20:52:03 schoolfactsonline node[2373]: ‘/var/www/blog/versions/4.39.0/core/server/overrides.js’,
Mar 12 20:52:03 schoolfactsonline node[2373]: ‘/var/www/blog/versions/4.39.0/core/boot.js’,
Mar 12 20:52:03 schoolfactsonline node[2373]: ‘/var/www/blog/versions/4.39.0/ghost.js’,
Mar 12 20:52:03 schoolfactsonline node[2373]: ‘/var/www/blog/versions/4.39.0/index.js’
Mar 12 20:52:03 schoolfactsonline node[2373]: ]
Mar 12 20:52:03 schoolfactsonline node[2373]: }
Mar 12 20:52:04 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Succeeded.
Mar 12 20:52:04 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Scheduled restart job, restart counter is at 5.
Mar 12 20:52:04 schoolfactsonline systemd[1]: Stopped Ghost systemd service for blog: blog-schoolfactsonline-com.
Mar 12 20:52:04 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Start request repeated too quickly.
Mar 12 20:52:04 schoolfactsonline systemd[1]: ghost_blog-schoolfactsonline-com.service: Failed with result ‘start-limit-hit’.
Mar 12 20:52:04 schoolfactsonline systemd[1]: Failed to start Ghost systemd service for blog: blog-schoolfactsonline-com.
star@schoolfactsonline:/var/www/blog$

Come on…

And also ghost run

I suspect you need to update Node.js.

ghost run is telling me it can’t find a module, suspecting the installation corrupted or it just skipped the module.

I’m not a mind reader… if you want help, you need to share some output. Try updating Node.js (16.x) and then reinstall the current version of Ghost.

Alrighty, long story short I got the rollback to work and the blog is now running on its previous version. Attempted the upgrade again, and I’m getting the same error as we have begun.

:heavy_check_mark: Fetched release notes
:heavy_multiplication_x: Downloading and updating Ghost to v4.39.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.39.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 “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.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.13.0
Ghost Version: 4.35.0
Ghost-CLI Version: 1.18.2
Environment: production
Command: ‘ghost upgrade’

Try running ghost doctor to check your system for known issues.
star@schoolfactsonline:/var/www/blog$

So, I solved the issue.

My way of solving this issue was by making the update not check for any RAM?? I don’t know how this worked, but the update went through fine and is working perfectly as intended, no errors.

Log:

star@schoolfactsonline:/var/www/blog$ ghost update --no-check-mem

  • sudo systemctl is-active ghost_blog-schoolfactsonline-com
    :heavy_check_mark: Checking system Node.js version - found v16.13.0
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    Your user does not own the directory /var/www/blog. This might cause permission issues.
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking free space
    :heavy_check_mark: Checking for available migrations
    :heavy_check_mark: Checking for latest Ghost version

:heavy_check_mark: Fetched release notes
:heavy_check_mark: Downloading and updating Ghost to v4.39.0

  • sudo systemctl stop ghost_blog-schoolfactsonline-com
    :heavy_check_mark: Stopping Ghost
    :heavy_check_mark: Linking latest Ghost and recording versions
  • sudo systemctl start ghost_blog-schoolfactsonline-com
    Warning: Ghost is running with node v14.19.0.
    Your current node version is v16.13.0.
    :heavy_check_mark: Restarting Ghost
    :heavy_check_mark: Removing old Ghost versions

star@schoolfactsonline:/var/www/blog$ ghost update --no-check-mem

  • sudo systemctl is-active ghost_blog-schoolfactsonline-com
    :heavy_check_mark: Checking system Node.js version - found v16.13.0
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    Your user does not own the directory /var/www/blog. This might cause permission issues.
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking free space
    :heavy_check_mark: Checking for available migrations
    :heavy_check_mark: Checking for latest Ghost version
    All up to date!
    star@schoolfactsonline:/var/www/blog$
1 Like

Looks like I’m (unfortunately), back. @mjw

:heavy_check_mark: Fetched release notes
:heavy_multiplication_x: Downloading and updating Ghost to v4.40.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.40.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 “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.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.13.0
Ghost Version: 4.39.0
Ghost-CLI Version: 1.18.2
Environment: production
Command: ‘ghost update --no-check-mem’

Additional log info available in: /home/star/.ghost/logs/ghost-cli-debug-2022-03-18T22_42_21_686Z.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.
star@schoolfactsonline:/var/www/blog$

Same error, same problem, except now the no memory trick isn’t working. Anymore advice?

1 Like

Had the same issues, seems like the only fix is to run Node v14. Try it out, seems like the latest and greatest v16 isn’t supported at all with Ubuntu 20

That’s why I use npm with Ubuntu 20.04.3.

@StarManTheGamer, now may be a time to take a backup of your database.