⚠ Partial

Node.js 22 + Alpine Linux: Works; Native Modules Need musl-Compatible Builds

Node.js 22 + Alpine Linux (musl)

Alpine Linux uses musl libc instead of glibc, which breaks native Node.js modules compiled against glibc. Node.js itself runs on Alpine (official Docker image: `node:22-alpine`), but packages like `sharp`, `bcrypt`, and `canvas` that ship pre-built glibc binaries fail. All such packages must compile from source on Alpine, which requires build tools.

Workarounds & Fixes

Related Error Pages

Related Combinations

Node.js 22 + Debian 12 (Bookworm) ⚠ Partial Node.js 20 + Alpine Linux (musl) ⚠ Partial Node.js 22 + Ubuntu 24.04 LTS ✓ Works Node.js 22 + Ubuntu 22.04 LTS ✓ Works
Last verified: 2024-10-01  ·  Category: Node.js + OS