From bd19015693b8fdd0348bdbf48281b68f5f86da83 Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Fri, 13 Mar 2026 14:46:55 -0700 Subject: [PATCH] Don't suggest npm ci --- AGENTS.md | 4 ++-- README.md | 6 +++--- app/frontend_static.py | 4 +++- tests/test_frontend_static.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2ca9898..fb7e1c7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -223,7 +223,7 @@ MESHCORE_SERIAL_PORT=/dev/cu.usbserial-0001 uv run uvicorn app.main:app --reload ```bash cd frontend -npm ci +npm install npm run dev # http://localhost:5173, proxies /api to :8000 ``` @@ -237,7 +237,7 @@ Terminal 2: `cd frontend && npm run dev` In production, the FastAPI backend serves the compiled frontend. Build the frontend first: ```bash -cd frontend && npm ci && npm run build && cd .. +cd frontend && npm install && npm run build && cd .. uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 ``` diff --git a/README.md b/README.md index 9e89013..131ceea 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ cd Remote-Terminal-for-MeshCore uv sync # Build frontend -cd frontend && npm ci && npm run build && cd .. +cd frontend && npm install && npm run build && cd .. # Run server uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 @@ -175,7 +175,7 @@ uv run uvicorn app.main:app --reload ```bash cd frontend -npm ci +npm install npm run dev # Dev server at http://localhost:5173 (proxies API to :8000) npm run build # Production build to dist/ ``` @@ -300,7 +300,7 @@ sudo -u remoteterm uv sync # Build frontend (required for the backend to serve the web UI) cd /opt/remoteterm/frontend -sudo -u remoteterm npm ci +sudo -u remoteterm npm install sudo -u remoteterm npm run build # Install and start service diff --git a/app/frontend_static.py b/app/frontend_static.py index fcc39fa..ddb0109 100644 --- a/app/frontend_static.py +++ b/app/frontend_static.py @@ -164,5 +164,7 @@ def register_frontend_missing_fallback(app: FastAPI) -> None: async def frontend_not_built(): return JSONResponse( status_code=404, - content={"detail": "Frontend not built. Run: cd frontend && npm ci && npm run build"}, + content={ + "detail": "Frontend not built. Run: cd frontend && npm install && npm run build" + }, ) diff --git a/tests/test_frontend_static.py b/tests/test_frontend_static.py index 8c1c86c..fbc21ce 100644 --- a/tests/test_frontend_static.py +++ b/tests/test_frontend_static.py @@ -28,7 +28,7 @@ def test_missing_dist_logs_error_and_keeps_app_running(tmp_path, caplog): with TestClient(app) as client: resp = client.get("/") assert resp.status_code == 404 - assert "npm ci" in resp.json()["detail"] + assert "npm install" in resp.json()["detail"] assert "npm run build" in resp.json()["detail"]