From 25d46e8a9ec59ec418e2201bcb8a86620dce6df2 Mon Sep 17 00:00:00 2001 From: figmar Date: Mon, 31 Aug 2026 05:53:02 +0800 Subject: [PATCH] fix(deepflow-frontend): pin pnpm@10.6.5 to match packageManager field 'npm install -g pnpm' pulled pnpm 11.x, whose engine-identity verification fails against the 10.6.5 lockfile (ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE). Pin the exact version in both deps and builder stages, and use --frozen-lockfile for the install. --- scripts/images/deepflow-frontend/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/images/deepflow-frontend/Dockerfile b/scripts/images/deepflow-frontend/Dockerfile index fcb20f3..3273921 100644 --- a/scripts/images/deepflow-frontend/Dockerfile +++ b/scripts/images/deepflow-frontend/Dockerfile @@ -12,9 +12,11 @@ WORKDIR /app COPY deepflow/web/ ./ # Install dependencies based on the preferred package manager +# pnpm 版本必须与 package.json 的 packageManager (pnpm@10.6.5) 一致, +# 否则 pnpm >=10.13 的 engine identity 校验会报 ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE RUN if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm i; \ + elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm@10.6.5 && pnpm i --frozen-lockfile; \ else echo "Lockfile not found." && exit 1; \ fi @@ -40,7 +42,7 @@ ENV NEXT_TELEMETRY_DISABLED=1 RUN if [ -f yarn.lock ]; then SKIP_ENV_VALIDATION=1 yarn build; \ elif [ -f package-lock.json ]; then SKIP_ENV_VALIDATION=1 npm run build; \ - elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && SKIP_ENV_VALIDATION=1 pnpm run build; \ + elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm@10.6.5 && SKIP_ENV_VALIDATION=1 pnpm run build; \ else echo "Lockfile not found." && exit 1; \ fi