Ghost seems to be a "try and error" project for self-hosting

It is the 3rd time i try to update my installation by using ghost update as written in the documentation. The project is so stable that every minor update causes hours over hours to invest to get somehow any clue how to get the project working again.

I tried to use ghost update to update from 3.20.3 to 3.32.2. After the update told me “everything is fine, your good to go” my website only returns errors, because the connection was refused.

In the log (ghost logs) there is some text like:

[2020-09-11 17:04:51] ERROR
NAME: MigrationScriptError
CODE: ER_TOO_LONG_KEY
MESSAGE: Field length of `customer_id` in `members_stripe_customers` is too long!

And i wonder why the migration fails silently. Why the installer tells me everything is fine? Why is ghost doctor telling me everything is fine? Why does ghost ls telling me the service is running when there is a failure and every url causes a “connection refused” error?

My next steps will be to read the issue mentioned in the log. I hope i will get my update working.

This usually happens if your database encoding is utf8mb4.
All unique fields and indexes must be lower than 191 characters.
Please correct your field length and reset your database with knex-migrator reset.
Read more here: https://github.com/TryGhost/knex-migrator/issues/51

On the other hand: I used the documentation and followed each step to get my setup running (installing Ubuntu, installing Mysql, etc). I see there a lot of improvement to get future updates running when some environment settings are not working. Furthermore: When i have to change globals of my database (just skipped through the issue mentioned above) it’s no minor update in sense of SemVer.

I am happy with the overlay, the speed, the templating-enginge for layouts but “updates” are horrible. I wonder if i am the only one who is “too dumb” to get updates working or if everyone else is paying for hosting to have no stress with any updates.


EDIT: The help in the linked issue has been working. An update to the latest version (3.32.2) is not working. But 3.30.0 is working fine.

For 3.32.2 i get a nice output like:

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@3.32.2: The engine "cli" appears to be invalid.
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.28"
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 " > bookshelf@0.15.2" has incorrect peer dependency "knex@>=0.13.0 <0.18.0".
warning Error running install script for optional dependency: "/var/www/ghost/versions/3.32.2/node_modules/dtrace-provider: spawn /bin/sh EAGAIN"
error An unexpected error occurred: "/var/www/ghost/versions/3.32.2/node_modules/core-js: spawn /bin/sh EAGAIN".

yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" 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 If you think this is a bug, please open a bug report with the information provided in "/var/www/ghost/versions/3.32.2/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

So currently an update to 3.32.2 is (for me) not possible. I wonder if the updates are better when i am using a docker-container instead of a native installation. In those cases only the database could cause issues.

I have the same issue when trying to upgrade to 3.38.3 via ghost update:

✖ Downloading and updating Ghost to v3.38.3
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@3.38.3: The engine "cli" appears to be invalid.
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.27.0"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@0.5.28"
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 " > bookshelf@0.15.2" has incorrect peer dependency "knex@>=0.13.0 <0.18.0".
warning " > @lodder/grunt-postcss@3.0.0" has unmet peer dependency "postcss@^8.0.9".

yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" 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, v16.04.3 LTS
    Node Version: v10.16.3
    Ghost Version: 3.28.0
    Ghost-CLI Version: 1.15.2
    Environment: production
    Command: 'ghost update'

Any ideas? I’ve tried clearing the yarn cache, upgrading npm and while my error seems similar to this report, that issue seems to be resolved now, so I’m out of ideas.

An update for anyone struggling with the same issues: after running ghost doctor a few times I finally got a warning about lack of memory. I restarted my DigitalOcean droplet, cleared the yarn cache again and then it worked :man_shrugging:t3:

1 Like