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 客户端生成