lightrag_webui/README.md
LightRAG WebUI is a React-based web interface for interacting with the LightRAG system. It provides a user-friendly interface for querying, managing, and exploring LightRAG's functionalities.
Install Bun:
If you haven't already installed Bun, follow the official documentation: https://bun.sh/docs/installation
Install Dependencies:
In the lightrag_webui directory, run the following command to install project dependencies:
bun install --frozen-lockfile
Build the Project:
Run the following command to build the project:
bun run build
This command will bundle the project and output the built files to the lightrag/api/webui directory.
If Bun is unavailable or the Bun build fails in your environment (e.g., older Linux distributions, restricted environments, or Bun version incompatibilities), you can use Node.js instead:
npm install
npm run build
Note: Tests (
bun test) still require Bun. All other scripts (dev,build,preview,lint) work with both Bun and Node.js/npm.
Start the Development Server:
# With Bun
bun run dev
# With Node.js/npm
npm run dev
The following are some commonly used script commands defined in package.json:
| Command | Description |
|---|---|
bun run dev / npm run dev | Starts the development server |
bun run build / npm run build | Builds the project for production |
bun run lint / npm run lint | Runs the linter |
bun run preview / npm run preview | Previews the production build |
bun run build:bun | Builds using Bun runtime explicitly |
bun test | Runs tests (Bun only) |
bun run build fails silently or with exit code 1This can happen due to Bun version incompatibilities or restricted environments. Try:
npm install
npm run build
Cannot find package '@/lib'This error occurred in older versions when the Vite config used a TypeScript path alias (@/) that only Bun could resolve at config load time. This has been fixed by using a relative import in vite.config.ts.