[GH-ISSUE #91] [Bug] Docker build failed #46

Closed
opened 2026-03-23 20:30:56 +00:00 by mirror · 3 comments
Owner

Originally created by @e-tornike on GitHub (Nov 23, 2021).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/91

Describe the bug
Docker backend build fails.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/AppFlowy-IO/appflowy.git
  2. docker build -f backend/Dockerfile .
  3. See error

Expected behavior
Docker should successfully create an image.

Desktop (please complete the following information):

  • Docker version 20.10.5, build 55c4c88

Additional context

error[E0599]: no variant or associated item named `Empty` found for enum `AnyBody<_>` in the current scope
  --> /app/shared-lib/backend-service/src/response/response_http.rs:21:32
   |
21 |             Err(_) => AnyBody::Empty,
   |                                ^^^^^
   |                                |
   |                                variant or associated item not found in `AnyBody<_>`
   |                                help: there is an associated function with a similar name: `empty`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `backend-service`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
The command '/bin/sh -c RUSTFLAGS="-C opt-level=2" cargo build --release' returned a non-zero code: 101
Originally created by @e-tornike on GitHub (Nov 23, 2021). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/91 **Describe the bug** Docker backend build fails. **To Reproduce** Steps to reproduce the behavior: 1. `git clone https://github.com/AppFlowy-IO/appflowy.git` 2. `docker build -f backend/Dockerfile .` 3. See error **Expected behavior** Docker should successfully create an image. **Desktop (please complete the following information):** - Docker version 20.10.5, build 55c4c88 **Additional context** - Version: commit 627aac9 ``` error[E0599]: no variant or associated item named `Empty` found for enum `AnyBody<_>` in the current scope --> /app/shared-lib/backend-service/src/response/response_http.rs:21:32 | 21 | Err(_) => AnyBody::Empty, | ^^^^^ | | | variant or associated item not found in `AnyBody<_>` | help: there is an associated function with a similar name: `empty` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`. error: could not compile `backend-service` To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed The command '/bin/sh -c RUSTFLAGS="-C opt-level=2" cargo build --release' returned a non-zero code: 101 ```
Author
Owner

@vnepogodin commented on GitHub (Nov 24, 2021):

It is not particularly docker(like at all)
And you can confirm it by just running same command at backend/

SQLX_OFFLINE=true APP_ENVIRONMENT="production" cargo build --release

which is giving the same error:

error[E0599]: no variant or associated item named `Empty` found for enum `AnyBody<_>` in the current scope
  --> /home/vl/appflowy/shared-lib/backend-service/src/response/response_http.rs:21:32
   |
21 |             Err(_) => AnyBody::Empty,
   |                                ^^^^^
   |                                |
   |                                variant or associated item not found in `AnyBody<_>`
   |                                help: there is an associated function with a similar name: `empty`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `backend-service`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
<!-- gh-comment-id:978075352 --> @vnepogodin commented on GitHub (Nov 24, 2021): It is not particularly docker(like at all) And you can confirm it by just running same command at `backend/` ``` bash SQLX_OFFLINE=true APP_ENVIRONMENT="production" cargo build --release ``` which is giving the same error: ``` error[E0599]: no variant or associated item named `Empty` found for enum `AnyBody<_>` in the current scope --> /home/vl/appflowy/shared-lib/backend-service/src/response/response_http.rs:21:32 | 21 | Err(_) => AnyBody::Empty, | ^^^^^ | | | variant or associated item not found in `AnyBody<_>` | help: there is an associated function with a similar name: `empty` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`. error: could not compile `backend-service` To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: build failed ```
Author
Owner

@appflowy commented on GitHub (Nov 26, 2021):

I have added the cargo.lock file to git. Would you mind pulling the latest main branch and try again

<!-- gh-comment-id:979592904 --> @appflowy commented on GitHub (Nov 26, 2021): I have added the cargo.lock file to git. Would you mind pulling the latest main branch and try again
Author
Owner

@e-tornike commented on GitHub (Nov 30, 2021):

Build is successful! Thank you :)

<!-- gh-comment-id:982661419 --> @e-tornike commented on GitHub (Nov 30, 2021): Build is successful! Thank you :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#46
No description provided.