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:
10
Dockerfile
10
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user