You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to build chainlit on my local Windows system. However, I'm running into an error on the step Start the Chainlit server from source
Traceback (most recent call last):
File "C:\Projects\chainlit\backend\.venv\Scripts\chainlit", line 6, in <module>
sys.exit(cli())
File "C:\Projects\chainlit\backend\.venv\lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "C:\Projects\chainlit\backend\.venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Projects\chainlit\backend\.venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Projects\chainlit\backend\.venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Projects\chainlit\backend\.venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Projects\chainlit\backend\chainlit\cli\__init__.py", line 201, in chainlit_run
run_chainlit(target)
File "C:\Projects\chainlit\backend\chainlit\cli\__init__.py", line 39, in run_chainlit
from chainlit.server import app
File "C:\Projects\chainlit\backend\chainlit\server.py", line 184, in <module>
build_dir = get_build_dir("frontend", "frontend")
File "C:\Projects\chainlit\backend\chainlit\server.py", line 181, in get_build_dir
raise FileNotFoundError(f"{local_target} built UI dir not found")
FileNotFoundError: frontend built UI dir not found
The error you're encountering, FileNotFoundError: frontend built UI dir not found, indicates that the frontend build directory is missing. Here are the steps to resolve this issue:
Check the Build Directory: Ensure that the "dist" directory exists in the expected location. The code looks for this directory at os.path.join(PACKAGE_ROOT, "frontend", "dist") and os.path.join(BACKEND_ROOT, "frontend", "dist").
Build the Frontend: If the directory does not exist, you need to build the frontend. Navigate to the frontend directory and run the following commands:
pnpm install
pnpm run dev --port 5174
This will install the necessary dependencies and start the development server for the frontend. Make sure you have pnpm installed and configured correctly on your Windows system. You might need to set the script shell to bash using:
pnpm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
Verify Custom Build Path: If you have a custom build path specified in your configuration (config.ui.custom_build), ensure that the path is correct and the build output is present there.
Following these steps should help you resolve the error and successfully run the Chainlit server from source [1][2].
Describe the bug
I am trying to build chainlit on my local Windows system. However, I'm running into an error on the step Start the Chainlit server from source
To Reproduce
Follow the steps listed in CONTRIBUTING.md
Expected behavior
Expected to successfully run the backend
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: