-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outdated version of string-width is causing the Docker image entrypoint loading to fail. #20065
Comments
I'm also seeing this in my docker build. Let me know if I can help provide any more info 👍 |
Currently I'm using kubernetes and a different approach to the entrypoint. I'm using distroless node 20 debian 12 as the final stage, and the entrypoint is actually a nodejs script which moves the themes and then inits the main function to start ghost. |
cc @acburdine 🙇 ❤️ (this is currently blocking updates to the |
I'm curious if this works here, ref: TryGhost/Ghost#20065
Hope this helps (and works 😂) docker-library/ghost#414 |
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 |
Potentially related to isaacs/jackspeak#5 + storybookjs/storybook#22431 (comment) |
The script which runs their tests is where the CI fails, at least as my understanding, probably I0m wrong: https://github.com/ngeorger/ghost/actions/runs/9014939335/job/24768631225#step:7:16 My approach is a bit different, I'm using multi stage builds and running fine on Kubernetes, both arm64 and amd64. Maybe this helps a bit :) https://github.com/sredevopsorg/ghost-on-kubernetes/blob/19c3c93ec92c9f728a0e99cbf03f5bc490a0e847/Dockerfile#L5 PS: I actually solved many crashes using yarn instead of npm, I guess uou are right :) Regards from Chile! |
Can people try using Yarn |
In fact, I think I'll just add a |
fixes #20065 refs storybookjs/storybook#22431 (comment) refs isaacs/jackspeak#5 - this adds a resolution for jackspeak, which is a dependency deep inside storybook - somewhere deep in the dependency tree, we're requiring an ESM package from a CJS package, which is causing issues - this should hopefully avoid that by pinning jackspeak to a working version
Let's give this a go 🙂 Let me know if it re-occurs |
Does that mean the solution didn't work? Or do we need to wait for next release? |
We need to wait for the release (should have checked the history log before opening the PR) |
Yep sorry, next release (today) |
JackSpeak resolution was not enough unfortunately https://github.com/docker-library/ghost/actions/runs/9063454953/job/24899459788#step:7:33 |
Latest version worked! Thanks all! |
Glad we could get it fixed! Lockfiles hey 🙄 |
Issue Summary
The update to fix arm32 architecture (c2485af) 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 nrwl/nx#19249. I managed to solve the issue locally by adding"string-width": "4.2.3"
to theresolutions
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)
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
The text was updated successfully, but these errors were encountered: