fix: use npm install instead of npm ci for more resilient builds

npm ci fails when package-lock.json is out of sync with package.json,
which is common with GitHub-downloaded ZIPs. Switched to npm install
with --legacy-peer-deps flag for maximum compatibility.
This commit is contained in:
keyhan
2026-04-06 01:00:25 +03:30
parent 2be3c50455
commit dfdffca7ef
+1 -1
View File
@@ -293,7 +293,7 @@ export class BuildService {
FROM node:20-alpine AS builder FROM node:20-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi && npm cache clean --force RUN npm install --legacy-peer-deps && npm cache clean --force
COPY . . COPY . .
# Auto-detect Next.js and enable standalone output # Auto-detect Next.js and enable standalone output