This commit is contained in:
eric
2026-03-29 03:49:29 -05:00
parent 22061fb3c8
commit 7cab3f27b8
8 changed files with 99 additions and 17 deletions

View File

@@ -93,6 +93,16 @@ def ensure_console_built(*, skip: bool) -> bool:
if _npm(["install"], cwd=CONSOLE) != 0:
sys.exit(1)
if _npm(["run", "build"], cwd=CONSOLE) != 0:
if OUT_INDEX.is_file():
print(
"[launch] npm run build 失败,但检测到已有 web-console/out/index.html"
"将继续启动 API静态页可能为旧构建请修复构建后重启",
)
return True
print(
"[launch] npm run build 失败且缺少 web-console/out/index.html"
"无法提供控制台。请在 web-console 目录执行 npm run build 或检查 Node/内存。",
)
sys.exit(1)
print("[launch] 前端构建完成。")
return True