From 5b2447c128deb940fe11997a059aab0e313f0419 Mon Sep 17 00:00:00 2001 From: oxiaoyu <825663811@qq.com> Date: Tue, 19 May 2026 17:01:00 +0800 Subject: [PATCH] fix: remove frozen-lockfile and add onlyBuiltDependencies to .npmrc --- backend/.npmrc | 6 ++++-- backend/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/.npmrc b/backend/.npmrc index 58e7c0b..e1dddc9 100644 --- a/backend/.npmrc +++ b/backend/.npmrc @@ -1,2 +1,4 @@ -enable-pre-post-scripts=true -only-built-dependencies=true \ No newline at end of file +onlyBuiltDependencies[]=@prisma/client +onlyBuiltDependencies[]=@prisma/engines +onlyBuiltDependencies[]=esbuild +onlyBuiltDependencies[]=prisma \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile index 1c03314..ae256f8 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -5,7 +5,7 @@ FROM node:22-alpine AS builder WORKDIR /app COPY package.json pnpm-lock.yaml .npmrc ./ -RUN corepack enable && pnpm install --frozen-lockfile +RUN corepack enable && pnpm install # Prisma 客户端生成 COPY prisma/ ./prisma/