From 325682378ea07af12663bb3810b773634d6ba97a Mon Sep 17 00:00:00 2001 From: oxiaoyu <825663811@qq.com> Date: Tue, 19 May 2026 16:50:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dnpm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.npmrc | 3 ++- backend/Dockerfile | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/.npmrc b/backend/.npmrc index 893e4cf..2d6101e 100644 --- a/backend/.npmrc +++ b/backend/.npmrc @@ -1 +1,2 @@ -onlyBuiltDependenciesFile= +enable-pre-post-scripts=true +onlyBuiltDependenciesFile= \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile index a1e02a1..1c03314 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,10 +4,7 @@ FROM node:22-alpine AS builder WORKDIR /app -ENV PNPM_APPROVE_BUILDS=* - -# 先装依赖(缓存最大化) -COPY package.json pnpm-lock.yaml ./ +COPY package.json pnpm-lock.yaml .npmrc ./ RUN corepack enable && pnpm install --frozen-lockfile # Prisma 客户端生成