From bf44bf3e9d2c325edb0cb01f604d9930fce51e8b Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Thu, 20 Aug 2026 18:22:36 +0300 Subject: [PATCH] fix(docker): resolve pnpm v10 ERR_PNPM_IGNORED_BUILDS in Dockerfile --- apps/api/Dockerfile | 2 +- apps/web/Dockerfile | 4 ++-- package.json | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 8bf31c9..9edb189 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -11,7 +11,7 @@ COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml tsconfig.base.json ./ COPY packages/shared ./packages/shared COPY apps/api ./apps/api -RUN pnpm install --frozen-lockfile --filter @menulio/api... +RUN pnpm install --frozen-lockfile --filter @menulio/api... --config.ignore-scripts=true RUN pnpm --filter @menulio/api build diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 038983d..403ae87 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -13,8 +13,8 @@ COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml tsconfig.base.json ./ COPY packages/shared/package.json ./packages/shared/ COPY apps/web/package.json ./apps/web/ -# Install dependencies for web & shared workspace -RUN pnpm install --frozen-lockfile --filter @menulio/web... +# Install dependencies for web & shared workspace ignoring unapproved optional scripts +RUN pnpm install --frozen-lockfile --filter @menulio/web... --config.ignore-scripts=true # 2. Build the Next.js application FROM base AS builder diff --git a/package.json b/package.json index 0590fa2..0372273 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,12 @@ "build": "pnpm -r build", "lint": "pnpm -r lint", "typecheck": "pnpm -r typecheck" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "@swc/core", + "esbuild", + "sharp" + ] } }