Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with full RAG and AI Agent capabilities.
https://anythingllm.com
MIT License
21.53k stars 2.21k forks source link

[BUG]: The "paths[0]" argument must be of type string. Received undefined #1684

Closed ericthomas1 closed 2 months ago

ericthomas1 commented 2 months ago

How are you running AnythingLLM?

Docker (remote machine)

What happened?

Testing the collector/utils/extensions/GithubRepo functionality using the Mintplex-Labs/anything-llm repo.

Detailed logs:

2024-06-14T16:59:23.8027098Z Fetching page 0 of branches for anything-llm
2024-06-14T16:59:23.9101379Z Fetching page 1 of branches for anything-llm
2024-06-14T16:59:23.9849946Z Fetching page 2 of branches for anything-llm
2024-06-14T17:01:43.3243565Z Fetching page 0 of branches for anything-llm
2024-06-14T17:01:43.4237683Z Fetching page 1 of branches for anything-llm
2024-06-14T17:01:43.5239623Z Fetching page 2 of branches for anything-llm
2024-06-14T17:01:43.6277486Z -- Working Github Mintplex-Labs/anything-llm:master --
2024-06-14T17:01:43.6287490Z [Github Loader]: Access token set! Recursive loading enabled!
2024-06-14T17:02:21.8869907Z [Github Loader]: Found 560 source files. Saving...
2024-06-14T17:02:21.8905544Z TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
2024-06-14T17:02:21.8905957Z     at new NodeError (node:internal/errors:405:5)
2024-06-14T17:02:21.8906001Z     at validateString (node:internal/validators:162:11)
2024-06-14T17:02:21.8906035Z     at Object.resolve (node:path:1097:7)
2024-06-14T17:02:21.8906072Z     at loadGithubRepo (/app/collector/utils/extensions/GithubRepo/index.js:41:14)
2024-06-14T17:02:21.8906131Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-06-14T17:02:21.8906174Z     at async /app/collector/extensions/index.js:14:43 {
2024-06-14T17:02:21.8906214Z   code: 'ERR_INVALID_ARG_TYPE'
2024-06-14T17:02:21.8906274Z }

Any insights?

Are there known steps to reproduce?

  1. Vanilla Docker deployment to Azure Web App
  2. Start service
timothycarambat commented 2 months ago

https://github.com/Mintplex-Labs/anything-llm/issues/1013#issuecomment-2039886108

You are missing the .env and if you have that you may also be missing the required STORAGE_DIR env https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md