Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install forked repository from github #1673

Closed
SigveSjovold opened this issue Jan 10, 2025 · 4 comments · Fixed by #1689
Closed

Unable to install forked repository from github #1673

SigveSjovold opened this issue Jan 10, 2025 · 4 comments · Fixed by #1689
Labels
bug Something isn't working frontend Pertains to the frontend. needs-triage

Comments

@SigveSjovold
Copy link

Describe the bug
I have made a fork of the chainlit repo and made some slight changes that can be seen in PR #1599. I have installed the dependencies by running:
cd backend
poetry install --with tests --with mypy --with dev

Then I install my fork by running:
pip install git+https://github.com/SigveSjovold/chainlit.git#subdirectory=backend

This installation is successful, but when I start my application I see this:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:(...)\Scripts\chainlit.exe_main
.py", line 8, in
File "C:(...)\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\click\core.py", line 783, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\chainlit\cli_init
.py", line 214, in chainlit_run
run_chainlit(target)
File "C:(...)\Lib\site-packages\chainlit\cli_init
.py", line 51, in run_chainlit
from chainlit.server import app
File "C:(...)\Lib\site-packages\chainlit\server.py", line 195, in
build_dir = get_build_dir("frontend", "frontend")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:(...)\Lib\site-packages\chainlit\server.py", line 192, in get_build_dir
raise FileNotFoundError(f"{local_target} built UI dir not found")
FileNotFoundError: frontend built UI dir not found

How can I fix this?

Copy link

dosubot bot commented Jan 10, 2025

I found 1 similar thread that might be helpful:

[1] The suggested solution is to ensure that the frontend build directory exists and to build the frontend if it is missing by running specific commands in the frontend directory. This directly addresses the FileNotFoundError you are encountering.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added bug Something isn't working frontend Pertains to the frontend. labels Jan 10, 2025
@desaxce
Copy link
Collaborator

desaxce commented Jan 10, 2025

I think you have to generate the frontend at least once. From the repo root, run pnpm run buildUi.

@ZaneZaiontz
Copy link

What version of poetry are you using? I had a similar issue when using poetry 2.0.0 and reverting back to 1.8.5 fixed my building issue.

@desaxce
Copy link
Collaborator

desaxce commented Jan 10, 2025

What version of poetry are you using? I had a similar issue when using poetry 2.0.0 and reverting back to 1.8.5 fixed my building issue.

Good point, you can change pyproject.toml to specify the poetry-core version:

[build-system]
requires = ["poetry-core==1.9.1"]
build-backend = "poetry.core.masonry.api"

The recent 2.0.0 release broke the copying of frontend dir during wheel build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Pertains to the frontend. needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants