From eac3dddf4056b73bdc5a68adb650b43214e3430d Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 28 Jun 2026 13:50:36 +0200 Subject: [PATCH] Use npm 11 in build stage to match the lockfile node:22 ships npm 10, which rejects the npm-11-generated package-lock ("Missing: @emnapi/core"). Upgrade npm to 11 before npm ci. Co-Authored-By: Claude Opus 4.8 (1M context) --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ce0b04..d5a5220 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ # --- Build stage: produce static dist/ --- -# Debian (glibc), not alpine: Astro 7's Rust toolchain (rolldown/oxc) has -# flaky musl native bindings, and the lockfile is resolved for linux-x64-gnu. +# Debian (glibc), not alpine: Astro 7's Rust toolchain (rolldown/oxc) resolves +# cleanly against the linux-x64-gnu lockfile entries. FROM node:22-slim AS build WORKDIR /app +# The lockfile is generated by npm 11; node:22 ships npm 10, which rejects it +# ("Missing: @emnapi/core ..."). Match the generator before installing. +RUN npm install -g npm@11 + # Install deps against the lockfile for reproducible builds. COPY package.json package-lock.json* ./ RUN npm ci