Ghost: Outdated version of string-width is causing the Docker image entrypoint loading to fail.

Issue Summary

The update to fix arm32 architecture (https://github.com/TryGhost/Ghost/commit/c2485af853f7b3b86f7f141b8496439cdc4881b4) introduce a regression in the way the Ghost package is launched. When running node index.js there is a module resolution error similar to this issue https://github.com/nrwl/nx/issues/19249. I managed to solve the issue locally by adding "string-width": "4.2.3" to the resolutions section.

Here is the Docker test showing the error: https://github.com/docker-library/ghost/actions/runs/8756974313/job/24034646549

I would like to contribute this fix but I am not sure which package.json to use because the packaged one seems to be generated from the source ones.

Steps to Reproduce

There is probably an more streamlined reproducible but building the Docker image here then running it (https://github.com/docker-library/ghost/tree/master/5/debian)

docker build -t ghost .
docker run --rm ghost 

Ghost Version

5.82.3

Node.js Version

18., 20.

How did you install Ghost?

In Docker using the Ghost CLI

Database type

MySQL 5.7

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Glad we could get it fixed! Lockfiles hey 🙄

Latest version worked! Thanks all!

In fact, I think I’ll just add a jackspeak resolution, as that solves it for most people

This is weird 🤔

We haven’t been seeing this with our internal builds but I do know we’ve run into it a few times with local dev. I think yarn is hoisting different versions of string-width up to the root, but I’m not entirely sure why