Build api failure
#1374
-
This is my problem: Building api
[+] Building 135.4s (9/10) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 890B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 97B 0.0s
=> [internal] load metadata for docker.io/library/node:20-alpine 17.5s
=> [internal] load build context 0.2s
=> => transferring context: 60.35kB 0.1s
=> CACHED [1/6] FROM docker.io/library/node:20-alpine@sha256:9e38d3d4117da74a643f67041c83914480b335c3bd44d37ccf5b5ad86cd715d1 0.0s
=> [2/6] COPY . /app 1.1s
=> [3/6] WORKDIR /app 0.1s
=> [4/6] RUN apk update 5.7s
=> ERROR [5/6] RUN apk --no-cache add curl && touch .env && npm ci 110.6s
------
> [5/6] RUN apk --no-cache add curl && touch .env && npm ci:
0.375 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
1.847 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
2.591 (1/8) Installing ca-certificates (20230506-r0)
2.788 (2/8) Installing brotli-libs (1.1.0-r1)
2.985 (3/8) Installing c-ares (1.22.1-r0)
3.165 (4/8) Installing libunistring (1.1-r2)
3.372 (5/8) Installing libidn2 (2.3.4-r4)
3.555 (6/8) Installing nghttp2-libs (1.58.0-r0)
3.738 (7/8) Installing libcurl (8.5.0-r0)
3.931 (8/8) Installing curl (8.5.0-r0)
4.116 Executing busybox-1.36.1-r15.trigger
4.121 Executing ca-certificates-20230506-r0.trigger
4.155 OK: 15 MiB in 25 packages
26.83 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
27.46 npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
109.9 npm notice
109.9 npm notice New patch version of npm available! 10.2.3 -> 10.2.5
109.9 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
109.9 npm notice Run `npm install -g [email protected]` to update!
109.9 npm notice
109.9 npm ERR! code 1
109.9 npm ERR! path /app/node_modules/sharp
109.9 npm ERR! command failed
109.9 npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
109.9 npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linuxmusl-x64.tar.br
109.9 npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
109.9 npm ERR! sharp: Installation error: aborted
109.9
109.9 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-17T05_51_34_800Z-debug-0.log
------
Dockerfile:9
--------------------
8 | RUN apk update
9 | >>> RUN apk --no-cache add curl && \
10 | >>> # We want to inherit env from the container, not the file
11 | >>> # This will preserve any existing env file if it's already in source
12 | >>> # otherwise it will create a new one
13 | >>> touch .env && \
14 | >>> # Build deps in seperate
15 | >>> npm ci
16 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk --no-cache add curl && touch .env && npm ci" did not complete successfully: exit code: 1
ERROR: Service 'api' failed to build : Build failed |
Beta Was this translation helpful? Give feedback.
Answered by
FrandKa
Dec 17, 2023
Replies: 1 comment 3 replies
-
Did you just do a fresh install or update? I ran a build today with no issues, let me know what steps you followed to start this. these are my goto instructions: https://docs.librechat.ai/install/docker_compose_install.html#updating-librechat # Stop the container (if running)
docker-compose down
# Fetch the latest changes from Github
git fetch origin
# Switch to the repo's main branch
git checkout main
# Pull the latest changes to the main branch from Github
git pull origin main
# Prune all LibreChat Docker images
docker rmi librechat:latest
# Remove all unused dangling Docker images
docker image prune -f
# Building a new LibreChat image without cache
docker-compose build --no-cache
# Start LibreChat
docker-compose up |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your enthusiastic answer. The problem has been solved: In fact, my network proxy was faulty. I found the problem when checking the network log(╯°□°); now it can be used normally;