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.
- Unable to upgrade Ghost from v3.0.2 to v3.5.1
- Update to 3.5.2 or 3.13.1 not working because of random yarn issues
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 email@example.com: The engine "cli" appears to be invalid. warning Resolution field "firstname.lastname@example.org" is incompatible with requested version "email@example.com" warning Resolution field "firstname.lastname@example.org" is incompatible with requested version "email@example.com" warning Resolution field "firstname.lastname@example.org" is incompatible with requested version "email@example.com" warning Resolution field "firstname.lastname@example.org" is incompatible with requested version "email@example.com" warning " > firstname.lastname@example.org" 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 email@example.com: The platform "linux" is incompatible with this module. info "firstname.lastname@example.org" 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.