fix(restart): invoke vite preview binary directly on 103
npm exec misparsed --config on Node 24/npm 11, causing preview to bind 4173 without /ops proxy and failing release health checks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -73,7 +73,9 @@ if ! curl -sf "http://127.0.0.1:${API_PORT}/health" >/dev/null; then
|
||||
fi
|
||||
|
||||
echo "==> 启动 vite preview @ ${WEB_HOST}:${PORT} (base=${BASE_PATH})..."
|
||||
nohup "${NPM_BIN}" exec vite preview --config scripts/vite-preview.config.mjs >>"${LOG}" 2>&1 &
|
||||
VITE_BIN="${ROOT}/node_modules/vite/bin/vite.js"
|
||||
[[ -f "${VITE_BIN}" ]] || { echo "❌ 缺少 ${VITE_BIN}" >&2; exit 1; }
|
||||
nohup "${NODE_BIN}" "${VITE_BIN}" preview --config scripts/vite-preview.config.mjs >>"${LOG}" 2>&1 &
|
||||
echo $! >"${PID_FILE}"
|
||||
sleep 3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user