Closed dylanwe closed 1 hour ago
There are a few similar issues that might help you resolve the problem with your custom components not appearing in Langflow.
Custom Components Not Appearing After Upgrade: One issue was related to custom components not appearing after upgrading to a new version. The solution involved ensuring that the __init__.py
file in the custom_component
directory correctly imports and exposes the necessary components. Additionally, the LANGFLOW_COMPONENTS_PATH
environment variable should be correctly set to the path of your custom components directory [1].
Components Overwriting Each Other: Another issue was that components with the same return type were overwriting each other in the UI. A temporary solution was to wrap each CustomComponent
's return value to ensure they have unique return types [2].
For your specific case, ensure that:
__init__.py
file in your custom components directory is set up correctly.LANGFLOW_COMPONENTS_PATH
is correctly set in your Dockerfile or environment.These steps should help in troubleshooting the issue with your custom components not appearing in the UI.
To continue talking to Dosu, mention @dosu.
Hey @dylanwe
How are you?
You should probably add them to an existing category (i.e one of the folder names in the repo's src/backend/base/langflow/components folder).
Let me know if that works.
Hey @dylanwe
How are you?
You should probably add them to an existing category (i.e one of the folder names in the repo's src/backend/base/langflow/components folder).
Let me know if that works.
Hey @ogabrielluiz, I'm good thanks for asking :).
I've changed my config to use a folder name from the components folder but I'm still not seeing it, now it looks like this:
FROM langflowai/langflow:1.0.19
COPY ./custom_components/components langflow/components
CMD ["langflow", "run"]
version: "3.9"
services:
langflow:
build:
context: .
dockerfile: dev.Dockerfile
ports:
- "7860:7860"
depends_on:
- postgres
environment:
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
- LANGFLOW_SECRET_KEY=superSecretKey
- LANGFLOW_PORT=7860
- LANGFLOW_HOST=0.0.0.0
postgres:
image: postgres:16
environment:
POSTGRES_USER: langflow
POSTGRES_PASSWORD: langflow
POSTGRES_DB: langflow
ports:
- "5432:5432"
volumes:
- langflow-postgres:/var/lib/postgresql/data
volumes:
langflow-postgres:
The copied folder looks like this:
If i check the container I can see it:
I've also tried adding this env variableLANGFLOW_COMPONENTS_PATH=/app/langflow/components
but that also didn't work.
Could it be that it's wrong to use the custom_component folder instead of another one like helpers? It seems like it, I've changed my directory from custom_component to agents and that worked! thank you for the help.
Bug Description
I don't see my custom components. I have the following dockerfile and docker compose configuration:
With the following component to test:
I see my component in the volume, but it doesn't show up when searching in the UI and I don't see an error in the logs
Reproduction
Run the dockerfile
Expected behavior
Be able to use the component in langflow.
Who can help?
@ogabrielluiz
Operating System
MacOS
Langflow Version
1.0.19
Python Version
3.12
Screenshot
Flow File
No response