's'
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user