ci: force-install sharp linux-x64 binary, clear omit env, verify load

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Asger Geel Weirsøe
2026-06-11 19:17:43 +02:00
co-authored by Claude Opus 4.8
parent 7cce714940
commit 7e583af822
+11 -4
View File
@@ -16,11 +16,18 @@ jobs:
with:
node-version: 22
# npm (not bun) + --include=optional so Sharp's platform binary
# (@img/sharp-linux-x64, an optional dep) installs on the runner,
# which otherwise omits optional deps -> astro:assets MissingSharp
# The runner forces omit of optional deps, dropping @img/sharp-linux-x64
# (sharp's platform binary) -> astro:assets MissingSharp. Clear the omit
# env and force-install the linux/glibc/x64 sharp binary per sharp's
# official cross-platform install, then verify it loads.
- name: Install dependencies
run: npm install --include=optional
env:
npm_config_omit: ""
npm_config_optional: "true"
run: |
npm install --include=optional
npm install --include=optional --os=linux --libc=glibc --cpu=x64 sharp
node -e "console.log('sharp', require('sharp').versions.sharp)"
- name: Build site
run: npm run build