[GH-ISSUE #5384] [BUG]: Docker build fails due to git dependency using branch instead of commit (epub2-static#main) #5059

Closed
opened 2026-06-05 14:51:46 -04:00 by yindo · 1 comment
Owner

Originally created by @rpdil23 on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5384

How are you running AnythingLLM?

Docker (local)

What happened?

Hi team,

While building AnythingLLM using Docker, the build fails during the collector dependency installation step due to the following dependency:

"epub2": "git+https://github.com/Mintplex-Labs/epub2-static.git#main"

Error

yarn install v1.22.19
[3/5] Fetching packages...
error An unexpected error occurred: "Commit hash required".

Root Cause

It seems Yarn (v1) does not reliably support Git dependencies pointing to a branch (#main) in Docker builds and expects a commit hash or tag instead.


Workaround

Replacing the dependency with the npm version resolves the issue:

"epub2": "^3.0.2"

After this change, the Docker build completes successfully.


Suggested Fix

One of the following:

  1. Replace with a stable npm release:

    "epub2": "^3.0.2"
    
  2. OR pin to a specific commit:

    "epub2": "git+https://github.com/Mintplex-Labs/epub2-static.git#<commit-hash>"
    

Environment

  • Docker build (multi-stage)
  • Node: 18
  • Yarn: 1.22.19
  • Base image: Ubuntu noble

Are there known steps to reproduce?

No response

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Originally created by @rpdil23 on GitHub (Apr 8, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5384 ### How are you running AnythingLLM? Docker (local) ### What happened? Hi team, While building AnythingLLM using Docker, the build fails during the `collector` dependency installation step due to the following dependency: ```json "epub2": "git+https://github.com/Mintplex-Labs/epub2-static.git#main" ``` --- ### **Error** ```bash yarn install v1.22.19 [3/5] Fetching packages... error An unexpected error occurred: "Commit hash required". ``` --- ### **Root Cause** It seems Yarn (v1) does not reliably support Git dependencies pointing to a **branch (`#main`)** in Docker builds and expects a **commit hash or tag** instead. --- ### **Workaround** Replacing the dependency with the npm version resolves the issue: ```json "epub2": "^3.0.2" ``` After this change, the Docker build completes successfully. --- ### **Suggested Fix** One of the following: 1. Replace with a stable npm release: ```json "epub2": "^3.0.2" ``` 2. OR pin to a specific commit: ```json "epub2": "git+https://github.com/Mintplex-Labs/epub2-static.git#<commit-hash>" ``` --- ### **Environment** * Docker build (multi-stage) * Node: 18 * Yarn: 1.22.19 * Base image: Ubuntu noble --- ### Are there known steps to reproduce? _No response_ ### LLM Provider & Model (if applicable) _No response_ ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bug label 2026-06-05 14:51:46 -04:00
yindo closed this issue 2026-06-05 14:51:46 -04:00
Author
Owner

@timothycarambat commented on GitHub (Apr 8, 2026):

You must be on some type of OS or have some config defined as I am on yarn 1.22.22 node 18.18.0 and do not get issues in our CI or locally building and we are not getting the same errors - this needs more information to try to reproduce

<!-- gh-comment-id:4210067163 --> @timothycarambat commented on GitHub (Apr 8, 2026): You must be on some type of OS or have some config defined as I am on yarn `1.22.22` node 18.18.0 and do not get issues in our CI or locally building and we are not getting the same errors - this needs more information to try to reproduce
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5059