This commit addresses the "Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received" error that occurs when async operations attempt to update state after component unmount. Changes: - Add component mount status tracking with useRef in App.tsx and DocumentManager.tsx - Implement beforeunload event listeners to handle page reload scenarios - Add mount status checks before and after async operations - Add try-catch blocks to properly handle errors in async operations - Ensure state updates only occur when components are still mounted - Prevent health check and document polling from causing errors during unmount |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.json | ||
| bun.lock | ||
| components.json | ||
| env.development.smaple | ||
| env.local.sample | ||
| eslint.config.js | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
LightRAG WebUI
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.
Installation
-
Install Bun:
If you haven't already installed Bun, follow the official documentation: https://bun.sh/docs/installation
-
Install Dependencies:
In the
lightrag_webuidirectory, 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 --emptyOutDirThis command will bundle the project and output the built files to the
lightrag/api/webuidirectory.
Development
-
Start the Development Server:
If you want to run the WebUI in development mode, use the following command:
bun run dev
Script Commands
The following are some commonly used script commands defined in package.json:
bun install: Installs project dependencies.bun run dev: Starts the development server.bun run build: Builds the project.bun run lint: Runs the linter.