Hi everyone,
I have been using Ghost for quite a while, right now I have about 5 websites running it on my server:
Ubuntu 20.04.6 LTS
Suddenly I started having some issues when upgrading ghost where it won’t start after that …
I am running NodeJS: v18.16.0
The current issue I have seems to be related to npm permissions, which is interesting since other instances are working? I also keep getting messages about “chalk” missing and so on …
If this helps, this is the snippet of the last failed attempt at updating from 5.47.0 > 5.47.1
I run ghost doctor and everything “seems ok”
Checking system Node.js version - found v18.16.0
Checking logged in user
Ensuring user is not logged in as ghost user
Checking if logged in user is directory owner
Checking current folder permissions
Checking system compatibility
Checking for a MySQL installation
- sudo systemctl is-active ghost_photo-marcobicca-com
Validating config
Checking folder permissions
Checking file permissions
Checking content folder ownership
Checking memory availability
Checking binary dependencies
Checking free space
Checking system unit file
Checking system node version - found v18.16.0
Then I ran:
$ ghost update --force
- sudo systemctl is-active ghost_photo-marcobicca-com
Checking system Node.js version - found v18.16.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
5.47.1
-
Updated Casper to v5.4.11 - Ghost CI
-
Fixed site setup hanging when mail isn’t configured - Fabien ‘egg’ O’Carroll
-
Fixed generating card assets with
include
allowlist (#16766) - Deepam Kapur -
Fixed Member signup when signup terms are null - Fabien “egg” O’Carroll
Fetched release notes
Downloading and updating Ghost to v5.47.1
A ProcessError occurred.
Message: Command failed: yarn install --no-emoji --no-progress
warning ghost[AT]5.47.1: The engine “cli” appears to be invalid.
warning Resolution field “[AT]elastic/elasticsearch[AT]8.5.0” is incompatible with requested version “[AT]elastic/elasticsearch[AT]8.6.0”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]^2.29.1”
warning Resolution field “[AT]tryghost/errors[AT]1.2.24” is incompatible with requested version “[AT]tryghost/errors[AT]1.2.21”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.29.1”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]^2.27.0”
warning Resolution field “moment-timezone[AT]0.5.23” is incompatible with requested version “moment-timezone[AT]^0.5.31”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.29.4”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.29.4”
warning Resolution field “moment-timezone[AT]0.5.23” is incompatible with requested version “moment-timezone[AT]0.5.34”
warning Resolution field “[AT]tryghost/errors[AT]1.2.24” is incompatible with requested version “[AT]tryghost/errors[AT]1.2.21”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.29.1”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.29.3”
warning Resolution field “moment-timezone[AT]0.5.23” is incompatible with requested version “moment-timezone[AT]^0.5.33”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]2.27.0”
warning Resolution field “[AT]tryghost/errors[AT]1.2.24” is incompatible with requested version “[AT]tryghost/errors[AT]1.2.25”
warning Resolution field “[AT]tryghost/logging[AT]2.4.4” is incompatible with requested version “[AT]tryghost/logging[AT]2.4.5”
warning Resolution field “[AT]tryghost/logging[AT]2.4.4” is incompatible with requested version “[AT]tryghost/logging[AT]^2.4.5”
warning Resolution field “[AT]tryghost/errors[AT]1.2.24” is incompatible with requested version “[AT]tryghost/errors[AT]1.2.25”
warning Resolution field “[AT]tryghost/logging[AT]2.4.4” is incompatible with requested version “[AT]tryghost/logging[AT]2.4.5”
warning Resolution field “moment[AT]2.24.0” is incompatible with requested version “moment[AT]^2.29.1”
warning “[AT]tryghost/kg-lexical-html-renderer > [AT]lexical/rich-text[AT]0.10.0” has unmet peer dependency “[AT]lexical/selection[AT]0.10.0”.
warning “[AT]tryghost/kg-lexical-html-renderer > [AT]lexical/rich-text[AT]0.10.0” has unmet peer dependency “[AT]lexical/utils[AT]0.10.0”.
warning " > bookshelf[AT]1.2.0" has incorrect peer dependency “knex[AT]>=0.15.0 <0.22.0”.
error /var/www/photo/versions/5.47.1/node_modules/re2: Command failed.
Exit code: 127
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || npm run rebuild
Arguments:
Directory: /var/www/photo/versions/5.47.1/node_modules/re2
Output:
Trying https://github.com/uhop/node-re2/releases/download/1.18.0/linux-x64-108.br …
Writing to build/Release/re2.node …
The verification has failed: building from sources …
Building locally …
/bin/sh: 1: npm: Permission denied
node: internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason “127”.] {
code: ‘ERR_UNHANDLED_REJECTION’
}
Node.js v18.16.0
/bin/sh: 1: npm: Permission denied
yarn install v1.22.19
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
[4/5] Linking dependencies…
[5/5] Building fresh packages…
Exit code: 127
Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v18.16.0
Ghost Version: 5.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: ‘ghost update --force’
–
Are there any special recommendations for having multiple ghost instances installed on the same server as far as NPM setup? Should each instance have its own NPM install? It is interesting that this has been working fine for a couple of years but a few months back, the upgrades are very unreliable, I always get errors like these OR permissions within the folders OR missing npm modules like chalk/luxon and others …
Any help is appreciated and please let me know if you need anyother details.
I have replaced the at signal with [AT] due to some limitations about tagging users.
Thank you,
-Marco