From 1956a995dd2a43b203ddbbe49f281fd02206a429 Mon Sep 17 00:00:00 2001 From: kimi-agent Date: Thu, 6 Aug 2026 03:07:25 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A.dockerignore=20?= =?UTF-8?q?=E6=94=BE=E8=A1=8C=20dist=EF=BC=9BDockerfile=20=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=98=BE=E5=BC=8F=E5=AE=89=E8=A3=85=20devDependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 1 - Dockerfile | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 0de3cd3..2d6394b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ node_modules -dist .git .gitignore Dockerfile diff --git a/Dockerfile b/Dockerfile index 6199985..8a67555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,10 @@ COPY package.json package-lock.json* ./ # RUN npm config set registry https://registry.npmmirror.com RUN npm ci --include=dev +# 兜底:某些环境的 npm 配置会强制跳过 devDependencies(导致 tsc 缺失、127 报错) +# 显式按 package.json 声明逐个安装,explicit install 不受 omit 配置影响 +RUN npm install --no-save --force $(node -e "console.log(Object.keys(require('./package.json').devDependencies||{}).join(' '))") + # 依赖自检:如果 tsc/vite 没装上,在这里就明确失败而不是 127 RUN ./node_modules/.bin/tsc --version && ./node_modules/.bin/vite --version