neo4j-labs / llm-graph-builder

Neo4j graph construction from unstructured data using LLMs
https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
Apache License 2.0
2.09k stars 317 forks source link

docker-compose up command fails #541

Closed kentstroker closed 2 months ago

kentstroker commented 2 months ago

When trying to build a local Docker deployment using the provided docker-compose file, there is a fatal error.

=> ERROR [frontend build 7/7] RUN BACKEND_API_URL=http://localhost:8000 REACT_APP_SOURCES=local,youtube,wiki,s 3.2s

[frontend build 7/7] RUN BACKEND_API_URL=http://localhost:8000 REACT_APP_SOURCES=local,youtube,wiki,s3 LLM_MODELS=diffbot,openai-gpt-3.5,openai-gpt-4o GOOGLE_CLIENT_ID="" BLOOM_URL=https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true TIME_PER_CHUNK=4 CHUNK_SIZE=5242880 ENV=DEV LARGE_FILE_SIZE=5242880 CHAT_MODES="" yarn run build: 0.433 yarn run v1.22.22 0.446 $ tsc && vite build 3.159 src/components/QuickStarter.tsx(44,15): error TS2322: Type '{ openSettingsDialog: () => void; isSettingPanelExpanded: boolean; closeSettingModal: () => void; closeOrphanNodeDeletionModal: () => void; showOrphanNodeDeletionModal: boolean; openOrphanNodeDeletionModal: () => void; }' is not assignable to type 'IntrinsicAttributes & { isSettingPanelExpanded: boolean; closeSettingModal: () => void; openSettingsDialog: () => void; }'. 3.159 Property 'closeOrphanNodeDeletionModal' does not exist on type 'IntrinsicAttributes & { isSettingPanelExpanded: boolean; closeSettingModal: () => void; openSettingsDialog: () => void; }'. 3.159 src/utils/Utils.ts(190,92): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. 3.159 Type 'undefined' is not assignable to type 'string'. 3.159 src/utils/Utils.ts(205,14): error TS2339: Property 'labels' does not exist on type 'Node'. 3.159 src/utils/Utils.ts(205,52): error TS2339: Property 'labels' does not exist on type 'Node'. 3.160 src/utils/Utils.ts(205,89): error TS2339: Property 'labels' does not exist on type 'Node'. 3.160 src/utils/Utils.ts(209,92): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. 3.160 Type 'undefined' is not assignable to type 'string'. 3.160 src/utils/Utils.ts(217,68): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. 3.160 Type 'undefined' is not assignable to type 'string'. 3.177 error Command failed with exit code 2. 3.177 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

failed to solve: process "/bin/sh -c BACKEND_API_URL=$BACKEND_API_URL REACT_APP_SOURCES=$REACT_APP_SOURCES LLM_MODELS=$LLM_MODELS GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID BLOOM_URL=$BLOOM_URL TIME_PER_CHUNK=$TIME_PER_CHUNK CHUNK_SIZE=$CHUNK_SIZE ENV=$ENV LARGE_FILE_SIZE=${LARGE_FILE_SIZE} CHAT_MODES=$CHAT_MODES yarn run build" did not complete successfully: exit code: 2

kentstroker commented 2 months ago

I took a look at the code using pyCharm. The errors thrown are indeed some problems in the code, such as incorrect type assignments and missing labels. I am not a front-end guy, so I will wait for more experienced people to take a look. This is a show stopper for my project - using the web-based tools, and AuraDB has proven to be really slow and prone to many errors. I plan to avoid those problems by running everything locally and with more resources. I appreciate any help you can provide. By the way, this tool has got a lot of potential.

kartikpersistent commented 2 months ago

The latest DEV branch don't have any type errors please setup the env files for both frontend and backend before running it locally.

mystvearn commented 2 months ago

I have created the env with both variables for front-end and back-end. Still I get the same error as being described in this thread

kartikpersistent commented 2 months ago

Please take the dev branch pull

jtele2 commented 1 month ago

I am also seeing this issue on main

kartikpersistent commented 1 month ago

It's fixed in the DEV branch so it will move to the main very soon