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:
co-authored by
Claude Opus 4.8
parent
7cce714940
commit
7e583af822
@@ -16,11 +16,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
|
||||||
# npm (not bun) + --include=optional so Sharp's platform binary
|
# The runner forces omit of optional deps, dropping @img/sharp-linux-x64
|
||||||
# (@img/sharp-linux-x64, an optional dep) installs on the runner,
|
# (sharp's platform binary) -> astro:assets MissingSharp. Clear the omit
|
||||||
# which otherwise omits optional deps -> astro:assets MissingSharp
|
# env and force-install the linux/glibc/x64 sharp binary per sharp's
|
||||||
|
# official cross-platform install, then verify it loads.
|
||||||
- name: Install dependencies
|
- 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
|
- name: Build site
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|||||||
Reference in New Issue
Block a user