Skip to content

fix(server): bump sharp #17818

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

Merged
merged 9 commits into from
Apr 23, 2025
Merged

fix(server): bump sharp #17818

merged 9 commits into from
Apr 23, 2025

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Apr 23, 2025

Description

We upgraded libvips, but haven't upgraded sharp along with it. This may be causing installation issues.

Tested and working on a RK3588 board.

@Stats274
Copy link

My server in Docker (ARM64) crashed on every start because this error:
Error: Could not load the "sharp" module using the linux-arm64 runtime

@m4r1vs
Copy link

m4r1vs commented Apr 23, 2025

Can confirm that this works on arm64 when deployed through the k8s Helm Chart. Thanks for the quick fix!

@mertalev
Copy link
Contributor Author

It "works", but it uses the wrong library so there are a lot of regressions in supported image formats. I think the issue might be that there's a transitive dependency on sharp that's resulting in it trying to install different versions of sharp...

@m4r1vs
Copy link

m4r1vs commented Apr 23, 2025

Oh I see, seems to be a dependency of react-email => next => sharp 0.33.5. Would me keeping my staging version of Immich pinned to this PR be of any help to you?

Copy link
Contributor

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge for patch release when confirmed that it works

@mertalev
Copy link
Contributor Author

Oh I see, seems to be a dependency of react-email => next => sharp 0.33.5. Would me keeping my staging version of Immich pinned to this PR be of any help to you?

Can you see if the latest image works?

@mertalev mertalev marked this pull request as ready for review April 23, 2025 21:07
@mertalev mertalev merged commit 6ce8a1d into main Apr 23, 2025
49 checks passed
@mertalev mertalev deleted the fix/bump-sharp branch April 23, 2025 21:08
@m4r1vs
Copy link

m4r1vs commented Apr 23, 2025

Oh I see, seems to be a dependency of react-email => next => sharp 0.33.5. Would me keeping my staging version of Immich pinned to this PR be of any help to you?

Can you see if the latest image works?

sure, ghcr.io/immich-app/immich-server:commit-7c6583e9a0b46a79c011039b870c618dbd90d566 works fine, heic and dng previews are generated as usual, thanks!

savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
* bump sharp

* test linking

* link in prod image too

* force global

* keep unnecessary libraries

* override sharp version

* revert dockerfile changes

* add node-gyp and napi

* dev dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants