[GH-ISSUE #3062] [BUG]: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. #1964

Closed
opened 2026-02-22 18:27:26 -05:00 by yindo · 1 comment
Owner

Originally created by @oatmealm on GitHub (Jan 30, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3062

How are you running AnythingLLM?

Docker (local)

What happened?

Seeing this error when attempting to bulk load from github:

[collector] info: [Github Loader]: Found 253 source files. Saving...
[collector] error: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.resolve (node:path:1097:7)
    at loadGithubRepo (/app/collector/utils/extensions/RepoLoader/GithubRepo/index.js:47:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/collector/extensions/index.js:37:43

Are there known steps to reproduce?

Select a repo and import. I tried adding some filters where I thought the import was failing, but it didn't help. I.e "src/public" 'src/assets" etc which are ignored but the import still fails.

Originally created by @oatmealm on GitHub (Jan 30, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3062 ### How are you running AnythingLLM? Docker (local) ### What happened? Seeing this error when attempting to bulk load from github: ``` [collector] info: [Github Loader]: Found 253 source files. Saving... [collector] error: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined at new NodeError (node:internal/errors:405:5) at validateString (node:internal/validators:162:11) at Object.resolve (node:path:1097:7) at loadGithubRepo (/app/collector/utils/extensions/RepoLoader/GithubRepo/index.js:47:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/collector/extensions/index.js:37:43 ``` ### Are there known steps to reproduce? Select a repo and import. I tried adding some filters where I thought the import was failing, but it didn't help. I.e "src/public" 'src/assets" etc which are ignored but the import still fails.
yindo added the possible bug label 2026-02-22 18:27:26 -05:00
yindo closed this issue 2026-02-22 18:27:26 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 30, 2025):

This is almost always because you are running the container improperly resulting in null paths for the loaded ENV
https://github.com/Mintplex-Labs/anything-llm/blob/e86ad82496e36bb2c529280fac488a99a1586832/collector/index.js#L1-L3

Run the command here:
https://docs.anythingllm.com/installation-docker/local-docker#recommend-way-to-run-dockerized-anythingllm
also found here https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md

@timothycarambat commented on GitHub (Jan 30, 2025): This is almost always because you are running the container improperly resulting in null paths for the loaded ENV https://github.com/Mintplex-Labs/anything-llm/blob/e86ad82496e36bb2c529280fac488a99a1586832/collector/index.js#L1-L3 Run the command here: https://docs.anythingllm.com/installation-docker/local-docker#recommend-way-to-run-dockerized-anythingllm also found here https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md
yindo changed title from [BUG]: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. to [GH-ISSUE #3062] [BUG]: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. 2026-06-05 14:43:43 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1964