Forum archive
Error updating Ghost CMS
I've installed the Ghost CMS turnkey and per the instrucions I've tried to do update Ghost to the latest version but the following error. Here is the console output below
ghost_user@Ghost-Dev ~$ ghost update
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_localhost
✔ Checking system Node.js version - found v16.15.0
✔ 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
A CliError occurred.Message: Unable to update Ghost directly to v5.37.0. You must be on the latest v4.x to update across major versions.
Help: Run "ghost update v4" to get the latest v4.x version, then run "ghost update" to get to v5.Debug Information:
OS: Debian GNU/Linux, v11
Node Version: v16.15.0
Ghost Version: 4.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost update'Additional log info available in: /opt/ghost/.ghost/logs/ghost-cli-debug-2023-03-06T16_54_14_985Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
ghost_user@Ghost-Dev ~$ ghost update v4Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_localhost
✔ Checking system Node.js version - found v16.15.0
✔ 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
✔ Release notes were not found
✖ Downloading and updating Ghost to v4.48.9
A ProcessError occurred.Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.48.9: 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.29.3"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/logging@2.1.8" is incompatible with requested version "@tryghost/logging@2.1.5"
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 " > 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".yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
Debug Information:
OS: Debian GNU/Linux, v11
Node Version: v16.15.0
Ghost Version: 4.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost update v4'Additional log info available in: /opt/ghost/.ghost/logs/ghost-cli-debug-2023-03-06T16_55_44_087Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
ghost_user@Ghost-Dev ~$
Here is the log file mentioned above:
Debug Information:
OS: Debian GNU/Linux, v11
Node Version: v16.15.0
Ghost Version: 4.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost update v4'
Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@4.48.9: 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.29.3"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/logging@2.1.8" is incompatible with requested version "@tryghost/logging@2.1.5"
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 " > 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".yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...--------------- stdout ---------------
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
--------------- stderr ---------------
warning ghost@4.48.9: 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.29.3"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/logging@2.1.8" is incompatible with requested version "@tryghost/logging@2.1.5"
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 " > 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".
Looking at the error message, see these lines:
So if you haven't already, I suspect that following that recommendation will get you further. I.e.:
Unfortunately though, it seems that the upgrade to Ghost v5.x fails unless you are using MySQL v8 explicitly - see the bug on our issue tracker and/or the thread where the original discussion occurred. TL;DR as we're based on Debian (which only provides MariaDB) and Ghost now only supports MySQL strictly, we don't have any nice way to support Ghost moving forward. To be clear, you can install MySQL yourself on TurnKey (Debian) - but we can't preinstall it - due to licensing issues. Whilst MySQL itself is free open source software, Debian doesn't package it anymore, and the way to install it (using the MySQL third party apt repo) is proprietary (it explicitly includes a no-redistribution clause). So we're a bit stuck on how we can move forward with Ghost.
If you want to continue to use the TurnKey Ghost appliance, you will need to install MySQL. The Ghost forums have a thread covering how to migrate from MariaDB to MySQL on Debian.
Apologies that this is all such a pain. Personally, I think explicitly requiring MySQL is a dumb plan on the Ghost devs part (if you only support one DB backend, MariaDB would be a better choice IMO). Ubuntu is pretty much the only Linux OS that still includes actual MySQL in their main repos (most others dropped MySQL in favor of MariaDB). OTOH you could also argue that the Debian (and other distro) devs should have continued to provide MySQL - and just added MariaDB.
Bottom line, if you have only just installed Ghost and don't have any data, you may be better off choosing an alternative to TurnKey for running Ghost (sorry for the time you've spent already). If you already have data loaded and/or wish to proceed with TurnKey, then please run through the Ghost forum post linked above to migrate from MariaDB to MySQL. If you do go through that, please do report back. If you hit any issues, please feel free to post back here and I'll do my best to help out.