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 FROM node:22-slim AS build
WORKDIR /app WORKDIR /app
# The lockfile is generated by npm 11; node:22 ships npm 10, which rejects it # Use npm install (not npm ci): Astro 7's wasm32 optional deps (@emnapi/*)
# ("Missing: @emnapi/core ..."). Match the generator before installing. # make npm ci's strict lock-sync check fail across npm/node versions. install
RUN npm install -g npm@11 # reconciles the lockfile and builds reliably.
# Install deps against the lockfile for reproducible builds.
COPY package.json package-lock.json* ./ COPY package.json package-lock.json* ./
RUN npm ci RUN npm install --no-audit --no-fund
COPY . . COPY . .
# PUBLIC_* env vars are inlined at build time. In Coolify, set them as # PUBLIC_* env vars are inlined at build time. In Coolify, set them as