From b33ceaf01728bdf99ceeb9950ca272fd1dbfdf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Tue, 31 Mar 2026 18:15:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20npm=20=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E4=BE=9D=E8=B5=96=E7=BD=91=E7=BB=9C=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加国内 npm registry 镜像配置(npmmirror) - 添加重试机制:先尝试 offline 模式,失败后重试正常模式 --- .woodpecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 9b7f718..a5eaf79 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,8 +8,9 @@ steps: environment: NODE_ENV: development CI: true + npm_config_registry: https://registry.npmmirror.com commands: - - npm ci --cache /tmp/npm-cache --prefer-offline --legacy-peer-deps + - npm ci --cache /tmp/npm-cache --prefer-offline --legacy-peer-deps || npm ci --cache /tmp/npm-cache --legacy-peer-deps volumes: - /tmp/npm-cache:/root/.npm - /tmp/node-modules-cache:/woodpecker/src/node_modules