From a0f104d1b40537932bd5210d672c75fa4dd07909 Mon Sep 17 00:00:00 2001 From: chenxing Date: Sat, 19 Sep 2026 14:21:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20npm=20install=20--ignore-scripts?= =?UTF-8?q?=EF=BC=88node-sass@6=20=E9=81=97=E7=95=99=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=9C=A8=20node:20=20=E6=97=A0=E9=A2=84=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=BF=85=E7=82=B8=EF=BC=9Bvite=20=E5=AE=9E=E9=99=85=E8=B5=B0?= =?UTF-8?q?=20dart-sass=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index a616335..3ff0d92 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -62,8 +62,10 @@ jobs: set -e cd /build if [ -f .npmrc ]; then sed -i "/SASS_BINARY_PATH/d" .npmrc; fi - # 本仓不提交 lock(.gitignore 忽略 yarn.lock/package-lock 均无),npm ci 无 lock 必 EUSAGE——用 install - npm install --no-audit --no-fund --loglevel=error + # 本仓不提交 lock(.gitignore 忽略 yarn.lock/package-lock 均无),npm ci 无 lock 必 EUSAGE——用 install。 + # --ignore-scripts:依赖里的 node-sass@6 是 webpack 遗留(vite 5 实际走 dart-sass), + # 其 node-gyp 编译在 node:20 无预编译包必炸;esbuild 二进制走 optionalDependencies 不受影响。 + npm install --ignore-scripts --no-audit --no-fund --loglevel=error npm run build ' echo "=== dist 产物 ==="