Latest update broke my local Ghost CMS

Installing the latest Manjaro updates somehow broke and destroyed my local Ghost CMS installation. I already tried reinstalling nodejs, yarn and also all the Ghost hints, like ghost cli, with force mode and even with root and everything to no avail. I would be really happy If anyone could help me out here or can give me any hint how to repair this or solve the issue.

Please see the following log output - thanks:

Debug Information:
OS: ManjaroLinux, v23.0.0
Node Version: v18.16.0
Ghost Version: 5.53.4
Ghost-CLI Version: 1.24.0
Environment: development
Command: ‘ghost update 5.53.4 --force’
Message: Command failed: yarn install --no-emoji --no-progress
warning …/…/package.json: No license field
warning ghostAT5.53.4: The engine “cli” appears to be invalid.
warning Resolution field “ATelastic/elasticsearchAT8.5.0” is incompatible with requested version “ATelastic/elasticsearchAT8.6.0”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.29.1”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsATghost update 5.53.4 --force1.2.21”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT^1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT^2.4.5”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.1”
warning Resolution field “momentAT2.24.0” is incompatible with requested version "momentAT^2.27.0"ghost update 5.53.4 --force
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.31”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.4”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT^1.2.25”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.4”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT0.5.34”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.21”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.1"ghost update 5.53.4 --force
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.3”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.33”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.27.0”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.31”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.27.0”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT2.4.5”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT^2.4.5”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT2.4.5”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.29.1”
warning “ATtryghost/kg-lexical-html-renderer > ATlexical/rich-textAT0.11.1” has unmet peer dependency “ATlexical/selectionAT0.11.1”.
warning “ATtryghost/kg-lexical-html-renderer > ATlexical/rich-textAT0.11.1” has unmet peer dependency “ATlexical/utilsAT0.11.1”.
warning " > bookshelfAT1.2.0” has incorrect peer dependency “knexAT>=0.15.0 <0.22.0”.
error /home/axxes/ghostbase/versions/5.53.4/node_modules/re2: Command failed.
Exit code: 7
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: /home/axxes/ghostbase/versions/5.53.4/node_modules/re2
Output:
Trying LINKs://github.com/uhop/node-re2/releases/download/1.18.3/linux-x64-108.br …
Writing to build/Release/re2.node …
The verification has failed: building from sources …
Building locally …
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^

TypeError: Class extends value undefined is not a constructor or null
at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0
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 “7”.] {
code: ‘ERR_UNHANDLED_REJECTION’
}

Node.js v18.16.0
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^

TypeError: Class extends value undefined is not a constructor or null
at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0

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…
info Visit LINKs://yarnpkg.com/en/docs/cli/install for documentation about this command.

Exit code: 7

--------------- stdout ---------------
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…
info Visit LINKs://yarnpkg.com/en/docs/cli/install for documentation about this command.

--------------- stderr ---------------
warning …/…/package.json: No license field
warning ghostAT5.53.4: The engine “cli” appears to be invalid.
warning Resolution field “ATelastic/elasticsearchAT8.5.0” is incompatible with requested version “ATelastic/elasticsearchAT8.6.0”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.29.1”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.21”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT^1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT^2.4.5”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.1”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.27.0”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.31”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.4”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT^1.2.25"ghost update 5.53.4 --force
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.4”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT0.5.34”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.21”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.1”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.29.3”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.33”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.27.0”
warning Resolution field “moment-timezoneAT0.5.23” is incompatible with requested version “moment-timezoneAT^0.5.31”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT2.27.0”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT2.4.5”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT^2.4.5”
warning Resolution field “ATtryghost/errorsAT1.2.24” is incompatible with requested version “ATtryghost/errorsAT1.2.25”
warning Resolution field “ATtryghost/loggingAT2.4.4” is incompatible with requested version “ATtryghost/loggingAT2.4.5”
warning Resolution field “momentAT2.24.0” is incompatible with requested version “momentAT^2.29.1”
warning “ATtryghost/kg-lexical-html-renderer > ATlexical/rich-textAT0.11.1” has unmet peer dependency “ATlexical/selectionAT0.11.1”.
warning “ATtryghost/kg-lexical-html-renderer > ATlexical/rich-textAT0.11.1” has unmet peer dependency “ATlexical/utilsAT0.11.1”.
warning " > bookshelfAT1.2.0” has incorrect peer dependency “knexAT>=0.15.0 <0.22.0”.ghost update 5.53.4 --force
error /home/axxes/ghostbase/versions/5.53.4/node_modules/re2: Command failed.
Exit code: 7
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: /home/axxes/ghostbase/versions/5.53.4/node_modules/re2
Output:
Trying LINKs://github.com/uhop/node-re2/releases/download/1.18.3/linux-x64-108.br …
Writing to build/Release/re2.node …
The verification has failed: building from sources …
Building locally …
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^

TypeError: Class extends value undefined is not a constructor or null
at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0
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 “7”.] {
code: ‘ERR_UNHANDLED_REJECTION’
}

Node.js v18.16.0
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^

TypeError: Class extends value undefined is not a constructor or null
at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0

You should check with the devleopers of this CMS.

It does not appear in neither the repo or in AUR

I am also already trying to contact with them. However I have a very strong feeling that all this is caused by the Manjaro Update. Reinstalling NODEJS, NPM or YARN brings no change. It really does not seem to be an issue of ghost itself, since I cant see more ghost users affected by this. And you must please understand that everything was working fine for a long time with several updates of Ghost / it broke after the Manjao Update!

This is what happens on the command line, when I try to update … >

npm install -g ghost-cli@latest  :heavy_check_mark:
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^

TypeError: Class extends value undefined is not a constructor or null
at Object. (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0

You should check the open issues with the project - or perhaps open a new issue if you cannot find an already opened one.

That may be true as your CMS is based on node.js and if node is updated an along with that npm - that may generat internal issues for your CMS.

If you are seeing this as something Manjaro should have predicted and thus not have released any node packages - I have to disappoint you - this is not how it works.

If you rely on a system which is predicatable with only bugfix and security updates - rolling release may not be the right system and you should consider a fixed release distribution in stead.

Thanks for your comment and I fully understand what you are saying.

Meanwhile I tried to deinstall and reinstall NODEJS, NPM and YARN and it seems that the Manjaro system itself is somehow broken. Now, when I use the GUI add-remove-software I cant deinstall these anymore and it always throws errors of missing things and dependencies. But the error window is so tiny that it is quite difficult to read its content. This is not about the Ghost CMS anymore.

How do I get back to a normal status of these apps, is there any way to self-test or auto-repair this? Are there any CLI commandos that I can use in order for to diagnose or self check the entire integrity of Manjaro, pa(c)man and especially of these packages? How do I reinstall them, if the Manjaro GUI does not let me?

node, node package manager and yarn is not a part of and not included with a pristine Manjaro system.

No

Not that I know of. But I don’t know everything - so it may be possible …

In the topic [root tip] [How To] Do a manual Manjaro installation it is described how to install the packages from a live ISO - recreating the ISO manually - in theory - this could be done on an existing system as well.

I don’t know if it will help in your case - if it doesn’t help - it has done no harm

cat /rootfs-pkgs.txt | awk '{print $1;}' > ~/iso-pkglist.txt
cat /desktopfs-pkgs.txt | awk '{print $1;}' >> ~/iso-pkglist.txt
pacman -Syu --noconfirm --needed - < ~/iso-pkglist.txt

I met the same npm error:

~ ❯ npm --version
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
    throw err
    ^

TypeError: LRU is not a constructor
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/semver/classes/range.js:188:15)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/semver/functions/satisfies.js:1:15)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)

Node.js v20.6.1

The solution is given by Archlinux users, and it works for me:

sudo pacman -R npm semver node-gyp
sudo rm -rf /usr/lib/node_modules/npm/node_modules/semver
sudo pacman -S npm