From 089fe88a7542f2bcff693143bfb22429c80d0f5a Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 23 Jul 2026 16:45:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(docker):=20=E5=A4=8D=E5=88=B6=20patches/=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=BB=A5=E4=BF=AE=E5=A4=8D=20pnpm=20install?= =?UTF-8?q?=20ENOENT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pnpm-workspace.yaml 声明了指向 patches/@tiptap__markdown@3.27.3.patch 的 patched 依赖,但 Docker 构建在 COPY package manifest 阶段未包含 patches/ 目录,导致 pnpm install --frozen-lockfile 因找不到 patch 文件而失败。将 libs/patches/ 加入 COPY 即可。 --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3d13fb1..5072459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -141,7 +141,11 @@ WORKDIR /build # Cache the pnpm workspace node_modules by copying only package manifests first. # Copying all 4 libs' manifests + the workspace root lets pnpm install everything # in one shot; this layer is reused as long as the manifests don't change. +# `pnpm-workspace.yaml` declares a patched dep (@tiptap/markdown) pointing at +# `patches/@tiptap__markdown@3.27.3.patch`, so the patches/ tree must be present +# before `pnpm install --frozen-lockfile` or it fails with ENOENT on the patch. COPY libs/package.json libs/pnpm-workspace.yaml libs/pnpm-lock.yaml libs/ +COPY libs/patches/ libs/patches/ COPY libs/tiptap-editor/package.json libs/tiptap-editor/ COPY libs/codemirror-editor/package.json libs/codemirror-editor/ COPY libs/lightbox/package.json libs/lightbox/