From c7a67ed58ae5aeeb5534206c8555c96cc3e8d151 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 25 Jul 2026 16:36:50 +0200 Subject: [PATCH] fix(build): align the musl sharp pins with the sharp version The bump to sharp 0.35.0 left the @img/sharp-linuxmusl-* pins on 0.35.1, so npm nested the 0.35.0 binary under node_modules/sharp while hoisting libvips to the root. The nested .node then looks for libvips-cpp.so.8.18.3 next to itself, finds nothing, and the Alpine image build dies in the client prebuild: Could not load the "sharp" module using the linuxmusl-x64 runtime ERR_DLOPEN_FAILED: Error loading shared library libvips-cpp.so.8.18.3 Neither docker workflow runs on push, so this only surfaces when a release is cut. Pin both binaries to 0.35.0 so they hoist next to libvips again. --- package-lock.json | 74 +++++++++-------------------------------------- package.json | 5 ++-- 2 files changed, 17 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8c37fcd7..66dc8519a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,8 +17,8 @@ "unrun": "^0.3.1" }, "optionalDependencies": { - "@img/sharp-linuxmusl-arm64": "0.35.1", - "@img/sharp-linuxmusl-x64": "0.35.1", + "@img/sharp-linuxmusl-arm64": "0.35.0", + "@img/sharp-linuxmusl-x64": "0.35.0", "@rollup/rollup-linux-arm64-musl": "4.62.0", "@rollup/rollup-linux-x64-musl": "4.62.0" } @@ -3319,12 +3319,15 @@ } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.1.tgz", - "integrity": "sha512-VoW2sQCWI+0YIKQEmWJ8vzaQjTg9wIyfkFpvEfAS2h43X6iHu7GTk1hhOgB4IpSzCHe8UwQZIcx7b81VTaOrJA==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.0.tgz", + "integrity": "sha512-DSTb6ijQzqe6DdAaOBVqJ/SYf1vO8EW5bK6X6LRXufEBebf2722VCdvBUtZ3rtV0x2ApfPNDy/p7LrrjaWjiyQ==", "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -3341,12 +3344,15 @@ } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.1.tgz", - "integrity": "sha512-LjBoSd/c5JU0/K5MwzDMlgsSRP2bPn98JQGFFQAOLQ0bU/1z4ekxUdSKY9BmlwSh/cA+OrvpgsWqfZyYfVHBRw==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.0.tgz", + "integrity": "sha512-K7ykQ+26Rt6+4BTU80AuGgTPIYX86UxiAKT4rcXX/WNTo7k1ZxpKz+TguHnwVpCqQK3B5PK0vZ0ZBe6nz/ib1w==", "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -17966,58 +17972,6 @@ "@img/sharp-win32-x64": "0.35.0" } }, - "node_modules/sharp/node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.0.tgz", - "integrity": "sha512-DSTb6ijQzqe6DdAaOBVqJ/SYf1vO8EW5bK6X6LRXufEBebf2722VCdvBUtZ3rtV0x2ApfPNDy/p7LrrjaWjiyQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.3.0" - } - }, - "node_modules/sharp/node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.0.tgz", - "integrity": "sha512-K7ykQ+26Rt6+4BTU80AuGgTPIYX86UxiAKT4rcXX/WNTo7k1ZxpKz+TguHnwVpCqQK3B5PK0vZ0ZBe6nz/ib1w==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.3.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/package.json b/package.json index 3ad790332..2ec6b820e 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,10 @@ "react-dom": "19.2.6", "multer": "^2.2.0" }, + "comment:optionalDependencies": "The lockfile is generated on glibc, so the musl builds the Alpine image needs never land in it on their own. Keep the @img/* pins on the same version as client's sharp — a mismatch nests the binary away from libvips and the image build dies in generate-icons.", "optionalDependencies": { - "@img/sharp-linuxmusl-arm64": "0.35.1", - "@img/sharp-linuxmusl-x64": "0.35.1", + "@img/sharp-linuxmusl-arm64": "0.35.0", + "@img/sharp-linuxmusl-x64": "0.35.0", "@rollup/rollup-linux-arm64-musl": "4.62.0", "@rollup/rollup-linux-x64-musl": "4.62.0" }