fix
This commit is contained in:
parent
edc5f84b6d
commit
5d328e2ddf
1 changed files with 8 additions and 0 deletions
|
|
@ -283,6 +283,14 @@ class ServerManager:
|
||||||
if (admin_web_dir / "package.json").exists():
|
if (admin_web_dir / "package.json").exists():
|
||||||
npm = shutil.which("npm")
|
npm = shutil.which("npm")
|
||||||
if npm:
|
if npm:
|
||||||
|
if not (admin_web_dir / "node_modules").exists():
|
||||||
|
r = subprocess.run(
|
||||||
|
[npm, "install"],
|
||||||
|
cwd=admin_web_dir, capture_output=True, text=True,
|
||||||
|
)
|
||||||
|
log.append(f"$ npm install (admin web)\n{r.stdout}{r.stderr}")
|
||||||
|
if r.returncode != 0:
|
||||||
|
return False, "\n".join(log)
|
||||||
r = subprocess.run(
|
r = subprocess.run(
|
||||||
[npm, "run", "build"],
|
[npm, "run", "build"],
|
||||||
cwd=admin_web_dir, capture_output=True, text=True,
|
cwd=admin_web_dir, capture_output=True, text=True,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue