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) <noreply@anthropic.com>
This commit is contained in:
+2
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user