Use frozen lockfile for consistent frontend builds
This commit is contained in:
parent
c0b1552e49
commit
a8bbce3ae7
2 changed files with 4 additions and 51 deletions
|
|
@ -39,7 +39,7 @@ pip install -e ".[api]"
|
||||||
|
|
||||||
# Build frontend when needed (can be done anytime)
|
# Build frontend when needed (can be done anytime)
|
||||||
cd lightrag_webui
|
cd lightrag_webui
|
||||||
bun install
|
bun install --frozen-lockfile
|
||||||
bun run build
|
bun run build
|
||||||
cd ..
|
cd ..
|
||||||
```
|
```
|
||||||
|
|
@ -66,7 +66,7 @@ cd LightRAG
|
||||||
|
|
||||||
# ⚠️ MUST build frontend FIRST
|
# ⚠️ MUST build frontend FIRST
|
||||||
cd lightrag_webui
|
cd lightrag_webui
|
||||||
bun install
|
bun install --frozen-lockfile
|
||||||
bun run build
|
bun run build
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ pip install ".[api]"
|
||||||
```bash
|
```bash
|
||||||
# Build frontend first
|
# Build frontend first
|
||||||
cd lightrag_webui
|
cd lightrag_webui
|
||||||
bun install
|
bun install --frozen-lockfile --production
|
||||||
bun run build
|
bun run build
|
||||||
cd ..
|
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
|
## Quick Reference
|
||||||
|
|
||||||
| Scenario | Command | Frontend Required | Can Build After |
|
| Scenario | Command | Frontend Required | Can Build After |
|
||||||
|
|
@ -208,7 +162,6 @@ LightRAG/
|
||||||
├── lightrag/
|
├── lightrag/
|
||||||
│ └── api/
|
│ └── api/
|
||||||
│ └── webui/ # Frontend build output (gitignored)
|
│ └── webui/ # Frontend build output (gitignored)
|
||||||
│ ├── .gitkeep # Preserves directory structure
|
|
||||||
│ ├── index.html # Built files (after running bun run build)
|
│ ├── index.html # Built files (after running bun run build)
|
||||||
│ └── assets/ # Built assets
|
│ └── assets/ # Built assets
|
||||||
│
|
│
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ def check_frontend_build():
|
||||||
"Please build the frontend code first using the following commands:\n"
|
"Please build the frontend code first using the following commands:\n"
|
||||||
)
|
)
|
||||||
ASCIIColors.cyan(" cd lightrag_webui")
|
ASCIIColors.cyan(" cd lightrag_webui")
|
||||||
ASCIIColors.cyan(" bun install")
|
ASCIIColors.cyan(" bun install --frozen-lockfile")
|
||||||
ASCIIColors.cyan(" bun run build")
|
ASCIIColors.cyan(" bun run build")
|
||||||
ASCIIColors.cyan(" cd ..")
|
ASCIIColors.cyan(" cd ..")
|
||||||
ASCIIColors.yellow("\nThen restart the service.\n")
|
ASCIIColors.yellow("\nThen restart the service.\n")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue