"ERROR: Service 'api' failed to build : Build failed" #1339
-
Contact Detailsunderlines@github What happened?I tried a fresh install and can't seem to build.
Steps to Reproduce
What browsers are you seeing the problem on?No response Relevant log outputubuntu@ip-111-111-111-111:~/LibreChat$ sudo docker-compose build
mongodb uses an image, skipping
meilisearch uses an image, skipping
Building api
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 28.1MB
Step 1/9 : FROM node:19-alpine AS node
19-alpine: Pulling from library/node
8a49fdb3b6a5: Pull complete
1197750296b3: Pull complete
f352bc07f19b: Pull complete
47be83a79857: Pull complete
Digest: sha256:8ec543d4795e2e85af924a24f8acb039792ae9fe8a42ad5b4bf4c277ab34b62e
Status: Downloaded newer image for node:19-alpine
---> e2a8cc97f817
Step 2/9 : COPY . /app
---> 4a64268f952f
Step 3/9 : WORKDIR /app
---> Running in b1575d45085f
Removing intermediate container b1575d45085f
---> 9f9fa036c1fa
Step 4/9 : RUN apk --no-cache add curl && touch .env && npm ci
---> Running in 783305cefca8
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/7) Installing ca-certificates (20230506-r0)
(2/7) Installing brotli-libs (1.0.9-r14)
(3/7) Installing libunistring (1.1-r1)
(4/7) Installing libidn2 (2.3.4-r1)
(5/7) Installing nghttp2-libs (1.57.0-r0)
(6/7) Installing libcurl (8.5.0-r0)
(7/7) Installing curl (8.5.0-r0)
Executing busybox-1.36.0-r9.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 14 MiB in 24 packages
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE current: { node: 'v19.9.0', npm: '9.6.3' }
npm WARN EBADENGINE }
> [email protected] prepare
> node config/prepare.js
stdout: husky - git command not found, skipping install
stderr:
added 1905 packages, and audited 1909 packages in 58s
425 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 9.6.3 -> 10.2.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
npm notice Run `npm install -g [email protected]` to update!
npm notice
Removing intermediate container 783305cefca8
---> 9b8059a8fc16
Step 5/9 : ENV NODE_OPTIONS="--max-old-space-size=2048"
---> Running in 37b4d7c5e128
Removing intermediate container 37b4d7c5e128
---> ff2bd1b44765
Step 6/9 : RUN npm run frontend
---> Running in 1f44144ddf27
> [email protected] frontend
> npm run build:data-provider && cd client && npm run build
> [email protected] build:data-provider
> cd packages/data-provider && npm run build
> [email protected] build
> npm run clean && rollup -c --silent --bundleConfigAsCjs
> [email protected] clean
> rimraf dist
> @librechat/[email protected] build
> cross-env NODE_ENV=production vite build
vite v5.0.7 building for production...
transforming...
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @librechat/[email protected]
npm ERR! at location: /app/client
The command '/bin/sh -c npm run frontend' returned a non-zero code: 1
ERROR: Service 'api' failed to build : Build failed
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Moved to troubleshooting because the dockerfile/compose file is working: https://github.com/danny-avila/LibreChat/actions/runs/7172598083 If build is failing in your env, you may not have enough resources but that is odd since I'm able to build just fine with similar specs: try your version of these ordered steps # 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
docker-compose build --no-cache
# Start LibreChat
docker-compose up You can also try the DigitalOcean guide (free $200 credit for 2 months here) or follow my steps from the guide on AWS |
Beta Was this translation helpful? Give feedback.
Moved to troubleshooting because the dockerfile/compose file is working: https://github.com/danny-avila/LibreChat/actions/runs/7172598083
If build is failing in your env, you may not have enough resources but that is odd since I'm able to build just fine with similar specs:
try your version of these ordered steps