diff --git a/docs/FrontendBuildGuide.md b/docs/FrontendBuildGuide.md index 4d416899..1e82c4f0 100644 --- a/docs/FrontendBuildGuide.md +++ b/docs/FrontendBuildGuide.md @@ -39,7 +39,7 @@ pip install -e ".[api]" # Build frontend when needed (can be done anytime) cd lightrag_webui -bun install +bun install --frozen-lockfile bun run build cd .. ``` @@ -66,7 +66,7 @@ cd LightRAG # ⚠️ MUST build frontend FIRST cd lightrag_webui -bun install +bun install --frozen-lockfile bun run build cd .. @@ -92,7 +92,7 @@ pip install ".[api]" ```bash # Build frontend first cd lightrag_webui -bun install +bun install --frozen-lockfile --production bun run build cd .. @@ -122,52 +122,6 @@ When creating a release on GitHub: --- -## Error Handling - -### Error: WebUI Not Built (Normal Install) - -``` -╔══════════════════════════════════════════════════════════════════════════╗ -║ ⚠️ ERROR: WebUI Not Built ║ -╚══════════════════════════════════════════════════════════════════════════╝ - -For normal installation (pip install .), you must build the frontend first: - - cd lightrag_webui - bun install - bun run build - cd .. - -Then run the installation again. - -💡 TIP: For development, use editable mode instead: - pip install -e ".[api]" -``` - -**Solution:** -- Build the frontend first, then install -- OR use development mode (`pip install -e ".[api]"`) - -### Info: Development Mode Without Frontend - -``` -╔══════════════════════════════════════════════════════════════════════════╗ -║ ℹ️ Development Mode - WebUI not built yet ║ -╚══════════════════════════════════════════════════════════════════════════╝ - -You're installing in development mode. You can build the frontend later: - - cd lightrag_webui - bun install - bun run build - -The changes will take effect immediately (symlink mode). -``` - -**This is informational only** - installation continues successfully. - ---- - ## Quick Reference | Scenario | Command | Frontend Required | Can Build After | @@ -208,7 +162,6 @@ LightRAG/ ├── lightrag/ │ └── api/ │ └── webui/ # Frontend build output (gitignored) -│ ├── .gitkeep # Preserves directory structure │ ├── index.html # Built files (after running bun run build) │ └── assets/ # Built assets │ diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 0786e031..9c1ec9e5 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -159,7 +159,7 @@ def check_frontend_build(): "Please build the frontend code first using the following commands:\n" ) ASCIIColors.cyan(" cd lightrag_webui") - ASCIIColors.cyan(" bun install") + ASCIIColors.cyan(" bun install --frozen-lockfile") ASCIIColors.cyan(" bun run build") ASCIIColors.cyan(" cd ..") ASCIIColors.yellow("\nThen restart the service.\n")