From 16d31cb87b01f88f53591f9a74cf337d4563d81c Mon Sep 17 00:00:00 2001 From: DuYunfan <1418316085@qq.com> Date: Fri, 8 May 2026 16:46:38 +0800 Subject: [PATCH] fix(frontend): use npm to match committed lockfile The Dockerfile invoked corepack + pnpm install, but the repo only ships package-lock.json (no pnpm-lock.yaml). On node:24-alpine corepack resolves to pnpm v10, whose default --strict-dep-builds rejects unbuilt postinstall scripts (esbuild, vue-demi, @vue-office/pptx) and aborts with ERR_PNPM_IGNORED_BUILDS, breaking docker compose build. Switching to npm ci / npm run build aligns the image build with CLAUDE.md and the local dev workflow that already uses npm. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 2d93f248..6a958a3f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -13,14 +13,13 @@ COPY pnpm-workspace.yaml ./ COPY packages/xlsx-0.20.2.tgz ./packages/xlsx-0.20.2.tgz # 安装依赖 -RUN corepack enable -RUN pnpm install +RUN npm ci # 复制项目文件 COPY . . # 构建应用 -RUN pnpm run build +RUN npm run build # 生产阶段 FROM nginx:stable-alpine AS production-stage