Use npm install instead of npm ci in build

Astro 7's wasm32 optional deps (@emnapi/*) make npm ci's strict lock-sync
check fail across npm/node versions. npm install reconciles and builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Luc Makiola
2026-06-28 13:52:15 +02:00
parent eac3dddf40
commit c0aa7153c7

View File

@@ -4,13 +4,11 @@
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.
# Use npm install (not npm ci): Astro 7's wasm32 optional deps (@emnapi/*)
# make npm ci's strict lock-sync check fail across npm/node versions. install
# reconciles the lockfile and builds reliably.
COPY package.json package-lock.json* ./
RUN npm ci
RUN npm install --no-audit --no-fund
COPY . .
# PUBLIC_* env vars are inlined at build time. In Coolify, set them as