Issue updating Ghost to 5.53.1

I host my Ghost blog on https://uklad.vc

I want to update to latest Ghost v5.53.1
Currently i have 5.51.1
My config is:

Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v14.15.0
    Ghost Version: 5.51.1
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost update'

While trying to update, updater gives message:

  1. Checking system Node.js version
Message: The version of Node.js you are using is not supported.
Supported: ^12.22.1 || ^14.17.0 || ^16.13.0 || ^18.0.0
Installed: 14.15.0

However when i switch via nvm use 18

ghost update gives

1) Checking system Node.js version

Message: The version of Node.js you are using is not supported.
Supported: ^10.13.0 || ^12.10.0 || ^14.15.0
Installed: 18.12.1

I usually just switched to nvm use 16 or 18, and ghost update worked.
Now i guess something with node is broken and i can’t understand how to fix that

Any help would be appreciated!

Quick update - resolved by

nvm use 16.15.0 - i guess that’s a common overlapping compatible version given my messed config of server

Oh no after successful upgrade, the following error message happened:

✔ Fetched release notes
✔ Downloading and updating Ghost to v5.53.1
+ sudo systemctl stop ghost_blog-uklad-vc
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
+ sudo systemctl start ghost_blog-uklad-vc
Warning: Ghost is running with node v14.17.6.
Your current node version is v16.15.0.
+ sudo systemctl stop ghost_blog-uklad-vc
✖ Restarting Ghost
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: Cannot find module 'assert/strict'
Require stack:
- /var/www/ghost/versions/5.53.1/node_modules/@tryghost/email-suppression-list/lib/email-suppression-list.js
- /var/www/ghost/versions/5.53.1/node_modules/@tryghost/email-suppression-list/index.js
- /var/www/ghost/versions/5.53.1/core/server/services/email-suppression-list/MailgunEmailSuppressionList.js
- /var/www/ghost/versions/5.53.1/core/server/services/email-suppression-list/service.js
- /var/www/ghost/versions/5.53.1/core/server/services/email-suppression-list/index.js
- /var/www/ghost/versions/5.53.1/core/server/services/members/middleware.js
- /var/www/ghost/versions/5.53.1/core/server/services/members/service.js
- /var/www/ghost/versions/5.53.1/core/server/services/members/index.js
- /var/www/ghost/versions/5.53.1/core/server/web/members/app.js
- /var/www/ghost/versions/5.53.1/core/server/web/members/index.js
- /var/www/ghost/versions/5.53.1/core/server/web/parent/frontend.js
- /var/www/ghost/versions/5.53.1/core/boot.js
- /var/www/ghost/versions/5.53.1/ghost.js
- /var/www/ghost/versions/5.53.1/index.js
Suggestion: journalctl -u ghost_blog-uklad-vc -n 50

Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v16.15.0
    Ghost Version: 5.53.1
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost update'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2023-06-28T07_01_50_875Z.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.



? Unable to upgrade Ghost from v5.51.1 to v5.53.1. Would you like to revert back to v5.51.1? Yes

You should have been running a supported version of node.

Try rolling back as suggested, and then update all node dependencies, e.g., npm update.

2 Likes

Hi!!
I’m facing the same issue when upgrading from v5.52.3 to v5.53.3.

Ghost was able to start, but errored during boot with: Cannot find module ‘assert/strict’

Any guess on how to fix that?
Thank you in advance.
Antonio Gomes.

=============================
console output

:heavy_check_mark: Checking system Node.js version - found v14.21.3
:heavy_check_mark: Ensuring user is not logged in as ghost user
: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 memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for available migrations
:heavy_check_mark: Checking for latest Ghost version

5.53.3

  • :bug: Fixed signup card in post plaintext and email preheader (#17163) - Simon Backx
  • :bug: Fixed repeating text in plaintext version of emails (#17162) - Simon Backx
  • :bug: Fixed members-only content incorrectly showing in plaintext email (#17137) - Michael Barrett

View the changelog for full details: Comparing v5.53.2...v5.53.3 · TryGhost/Ghost · GitHub

:globe_with_meridians: Help us translate Ghost + Portal: Help translate Ghost (beta)

:heavy_check_mark: Fetched release notes
Version already installed.
:information_source: Downloading and updating Ghost [skipped]

  • sudo systemctl stop ghost_elearningcenter-com-br
    :heavy_check_mark: Stopping Ghost
    :heavy_check_mark: Linking latest Ghost and recording versions
  • sudo systemctl start ghost_elearningcenter-com-br
  • sudo systemctl stop ghost_elearningcenter-com-br
    :heavy_multiplication_x: Restarting Ghost
    A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: Cannot find module ‘assert/strict’
Debug Information:
OS: Ubuntu, v22.04.2 LTS
Node Version: v14.21.3
Ghost Version: 5.53.3
Ghost-CLI Version: 1.24.1
Environment: production
Command: ‘ghost update’
? Unable to upgrade Ghost from v5.52.3 to v5.53.3. Would you like to revert back to v5.52.3? Yes

The solution is the same: install a supported version of Node before upgrading. Therefore, roll back, upgrade to Node 16 or 18, and then upgrade Ghost.

Hi!!
Thank you for your reply!!
I applied your suggestion but got the same error message:

Ghost was able to start, but errored during boot with: Cannot find module ‘assert/strict’

=============================
Console output
:heavy_check_mark: Checking system Node.js version - found v18.16.0
:heavy_check_mark: Ensuring user is not logged in as ghost user
: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 memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for available migrations
:heavy_check_mark: Checking for latest Ghost version

5.53.4

This release contains fixes for minor bugs and issues reported by Ghost users.

:heavy_check_mark: Fetched release notes
:heavy_check_mark: Downloading and updating Ghost to v5.53.4

  • sudo systemctl stop ghost_elearningcenter-com-br
    :heavy_check_mark: Stopping Ghost
    :heavy_check_mark: Linking latest Ghost and recording versions
  • sudo systemctl start ghost_elearningcenter-com-br
    Warning: Ghost is running with node v14.21.3.
    Your current node version is v18.16.0.

:heavy_multiplication_x: Restarting Ghost
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: Cannot find module ‘assert/strict’
Require stack:

  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/node_modules/@tryghost/email-suppression-list/lib/email-suppression-list.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/node_modules/@tryghost/email-suppression-list/index.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/email-suppression-list/MailgunEmailSuppressionList.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/email-suppression-list/service.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/email-suppression-list/index.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/members/middleware.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/members/service.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/services/members/index.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/web/members/app.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/web/members/index.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/server/web/parent/frontend.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/core/boot.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/ghost.js
  • /var/www/xxxxxxxxxxxxxxxxxxxxxxxxr/versions/5.53.4/index.js
    Suggestion: journalctl -u ghost_elearningcenter-com-br -n 50

Debug Information:
OS: Ubuntu, v22.04.2 LTS
Node Version: v18.16.0
Ghost Version: 5.53.4
Ghost-CLI Version: 1.24.1
Environment: production
Command: ‘ghost update’

Additional log info available in: /home/acpgomes/.ghost/logs/ghost-cli-debug-2023-07-05T19_28_44_622Z.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.

? Unable to upgrade Ghost from v5.52.3 to v5.53.4. Would you like to revert back to v5.52.3? Yes

  • sudo systemctl is-active ghost_elearningcenter-com-br
  • sudo systemctl reset-failed ghost_elearningcenter-com-br
    :heavy_check_mark: Checking system Node.js version - found v18.16.0
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :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

5.52.3

  • :bug: Fixed revision save reverting newly published post to draft (#17083) - Michael Barrett

View the changelog for full details: Comparing v5.52.2...v5.52.3 · TryGhost/Ghost · GitHub

:globe_with_meridians: Help us translate Ghost + Portal: Help translate Ghost (beta)

:heavy_check_mark: Fetched release notes
:information_source: Downloading and updating Ghost [skipped]

  • sudo /var/www/xxxxxxxxxxxxxxxxxxxxxxxx/current/node_modules/.bin/knex-migrator-rollback
    Debug Information:
    OS: Ubuntu, v22.04.2 LTS
    Node Version: v18.16.0
    Ghost Version: 5.53.4
    Ghost-CLI Version: 1.24.1
    Environment: production
    Command: ‘ghost update’

Additional log info available in: /home/acpgomes/.ghost/logs/ghost-cli-debug-2023-07-05T19_28_44_622Z.log

Try running ghost doctor to check your system for known issues

? Unable to upgrade Ghost from v5.52.3 to v5.53.4. Would you like to revert back to v5.52.3? Yes

Make sure you have the latest command line utilities.

sudo npm install -g ghost-cli@latest

If you still get the error, try:

sudo npm install -g assert-strict
# or
sudo npm audit fix 

End of 2024, still relevant, sudo npm install -g assert-strict doesn’t help. Node 18 or 20, same error during upgrade.