From 95b7fed6d5289259e8a93af8658843320f0706da Mon Sep 17 00:00:00 2001 From: matevip Date: Sat, 9 May 2026 06:53:09 +0800 Subject: [PATCH] fix(docker): pin pnpm@10 + whitelist build scripts (#80) --- mateclaw-server/Dockerfile | 6 +++++- mateclaw-ui/package.json | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mateclaw-server/Dockerfile b/mateclaw-server/Dockerfile index 4b8874fb..16957831 100644 --- a/mateclaw-server/Dockerfile +++ b/mateclaw-server/Dockerfile @@ -5,7 +5,11 @@ # build container. These files are later copied into the JAR's classpath so # Spring Boot serves the SPA at the root URL. FROM node:22-alpine AS frontend-builder -RUN npm install -g pnpm --silent +# Pin pnpm to a major version so the Docker build doesn't break when the npm +# `latest` tag jumps majors. pnpm v10+ blocks dependency lifecycle scripts by +# default; the allowed packages live under `pnpm.onlyBuiltDependencies` in +# mateclaw-ui/package.json. +RUN npm install -g pnpm@10 --silent WORKDIR /frontend # Install dependencies first (layer cache) COPY mateclaw-ui/package.json mateclaw-ui/pnpm-lock.yaml ./ diff --git a/mateclaw-ui/package.json b/mateclaw-ui/package.json index 26294ee3..95f2c230 100644 --- a/mateclaw-ui/package.json +++ b/mateclaw-ui/package.json @@ -51,5 +51,11 @@ "typescript": "~5.7.2", "vite": "^7.3.1", "vue-tsc": "^3.2.6" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "esbuild", + "vue-demi" + ] } }