Repository navigation
[Question]:The command '/bin/sh -c npm run frontend' returned a non-zero code: 1 ERROR: Service 'api' failed to build: Build failed #1046
Unanswered
lb-lin
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
|
I've never deployed on Azure but this looks like a memory issue that ive run into with low mem VPS. Vite uses too much memory during bundling. One potential workaround is to use bun.js for bundling which i found to be memory efficient. I can't confirm this yet but in case you want to try that yourself. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Contact Details
linlibiaochn@gmail.com
What is your question?
I am encountering an issue while trying to deploy the LibreChat project on an Ubuntu 22 virtual machine in Azure.
During the Docker build process(docker-compose build)
More Details
The following is the output after executing 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 26.38MB
Step 1/9 : FROM node:19-alpine AS node
---> e2a8cc97f817
Step 2/9 : COPY . /app
---> Using cache
---> 761cbc549c14
Step 3/9 : WORKDIR /app
---> Using cache
---> ecee48d8e9b9
Step 4/9 : RUN apk --no-cache add curl && touch .env && npm ci
---> Using cache
---> c7abb5eef0c1
Step 5/9 : ENV NODE_OPTIONS="--max-old-space-size=2048"
---> Using cache
---> 812362602d5f
Step 6/9 : RUN npm run frontend
---> Running in e89991cc7930
vite v4.4.9 building for production...
transforming...
../node_modules/@tanstack/react-query-devtools/build/lib/index.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useQueries.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useQuery.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/QueryClientProvider.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/Hydrate.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useIsFetching.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useIsMutating.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useMutation.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useInfiniteQuery.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/isRestoring.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query-devtools/build/lib/devtools.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/reactBatchedUpdates.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query/build/lib/useBaseQuery.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query-devtools/build/lib/theme.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
../node_modules/@tanstack/react-query-devtools/build/lib/Explorer.mjs (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
[plugin:vite:resolve] Module "node:path" has been externalized for browser compatibility, imported by "/app/node_modules/filenamify/filenamify-path.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
npm ERR! Lifecycle script
buildfailed with error:npm ERR! Error: command failed
npm ERR! in workspace: @librechat/frontend@0.5.9
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
What is the main subject of your question?
No response
Screenshots
Code of Conduct
All reactions