diff --git a/script/deploy-remote.cjs b/script/deploy-remote.cjs index 2b2893b..9c70177 100644 --- a/script/deploy-remote.cjs +++ b/script/deploy-remote.cjs @@ -190,6 +190,9 @@ function main() { ' fi', ' fi', 'fi', + // 清理 node_modules 后重新安装,避免残留状态导致 npm semver 冲突 + 'echo "正在清理旧 node_modules ..."', + 'rm -rf "$TARGET_DIR/node_modules"', 'npm install --production', ].join('\n');