sharp fails to load on Alpine

The Node.js template builds on node:22-alpine, which uses musl. An install made elsewhere may lack the musl binary. Switching the FROM line to a glibc image such as node:22-slim also avoids it.

Last updated November 25, 2026

The error

Error: Could not load the "sharp" module using the linuxmusl-x64 runtime

Why it happens

The Node.js template builds on node:22-alpine, which uses musl. An install made elsewhere may lack the musl binary. Switching the FROM line to a glibc image such as node:22-slim also avoids it.

How to fix it

Let the Docker build install it, and regenerate the lockfile so it includes optional dependencies.

rm -rf node_modules package-lock.json
npm install
ezhst deploy

Still stuck

Read the build log and runtime logs, or browse all errors.

Start for free

Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.

$npx ezhst skill install