From bdf53980c01ac1aea6fe0492b8f6aeaded6a07fe Mon Sep 17 00:00:00 2001 From: Arnaud Nelissen Date: Thu, 25 Jun 2026 09:10:33 +0200 Subject: [PATCH] fix(docker): prevent pnpm TTY prompt when BuildKit cache has stale node_modules pnpm 11 aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY when it detects an existing node_modules directory and there is no TTY to confirm purging it. This happens in Portainer when BuildKit layer cache reuses a prior deps stage containing node_modules. - .npmrc: set confirmModulesPurge=false (skip prompt unconditionally) - Dockerfile deps stage: set CI=true (belt-and-suspenders for pnpm CI mode) Co-Authored-By: Claude Sonnet 4.6 --- .npmrc | 1 + Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/.npmrc b/.npmrc index 2e0151c..4d88e4e 100644 --- a/.npmrc +++ b/.npmrc @@ -3,3 +3,4 @@ onlyBuiltDependencies[]=core-js onlyBuiltDependencies[]=prisma onlyBuiltDependencies[]=sharp onlyBuiltDependencies[]=unrs-resolver +confirmModulesPurge=false diff --git a/Dockerfile b/Dockerfile index 502e520..f9db529 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN apk add --no-cache openssl && \ FROM base AS deps WORKDIR /app ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x +ENV CI=true COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./ RUN pnpm install --frozen-lockfile --ignore-scripts