QuivrHQ / quivr

Your GenAI Second Brain 🧠 A personal productivity assistant (RAG) ⚡️🤖 Chat with your docs (PDF, CSV, ...) & apps using Langchain, GPT 3.5 / 4 turbo, Private, Anthropic, VertexAI, Ollama, LLMs, Groq that you can share with users ! Local & Private alternative to OpenAI GPTs & ChatGPT powered by retrieval-augmented generation.

Home Page:https://quivr.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: error /app/node_modules/sharp: Command failed.

NewSNode opened this issue · comments

What happened?

when i exec docker compose up,same error comes, as log info.

what happened?

Relevant log output

=> ERROR [frontend deps 6/6] RUN     if [ -f yarn.lock ]; then yarn --frozen-lockfile;     elif [ -f pac  404.3s
------
 > [frontend deps 6/6] RUN     if [ -f yarn.lock ]; then yarn --frozen-lockfile;     elif [ -f package-lock.json ]; then npm ci;     elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile;     else echo "Lockfile not found." && exit 1;     fi:
0.674 yarn install v1.22.19
0.800 [1/4] Resolving packages...
1.417 [2/4] Fetching packages...
1.432 warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-string-width-cjs-4.2.3-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
362.9 warning chart.js@4.4.2: The engine "pnpm" appears to be invalid.
362.9 [3/4] Linking dependencies...
362.9 warning " > @testing-library/user-event@14.5.1" has unmet peer dependency "@testing-library/dom@>=7.21.4".
362.9 warning " > @typescript-eslint/eslint-plugin@5.62.0" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
363.0 warning " > @vitejs/plugin-react@4.0.4" has unmet peer dependency "vite@^4.2.0".
398.3 [4/4] Building fresh packages...
399.1 error /app/node_modules/sharp: Command failed.
399.1 Exit code: 1
399.1 Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
399.1 Arguments:
399.1 Directory: /app/node_modules/sharp
399.1 Output:
399.1 sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linuxmusl-x64.tar.br
399.1 sharp: Installation error: connect ECONNREFUSED 127.0.0.1:443
399.1 sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
399.1 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn --frozen-lockfile;     elif [ -f package-lock.json ]; then npm ci;     elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile;     else echo \"Lockfile not found.\" && exit 1;     fi" did not complete successfully: exit code: 1

Twitter / LinkedIn details

No response

The error you're encountering with the sharp module during your Docker build is likely due to it failing to download the libvips library from GitHub's servers. This can happen because of network connectivity issues or a proxy blocking access to GitHub.

To work around this, you can specify an alternative URL for downloading libvips by setting the SHARP_DIST_BASE_URL environment variable in your Dockerfile. Here's an example of how to do it:

ENV SHARP_DIST_BASE_URL="https://your-alternative-url.com/"

Replace "https://your-alternative-url.com/" with the URL of your alternative source for libvips.

Additionally, since you're using an Alpine Linux base image, you might need to install the vips-dev package to resolve any issues related to compiling the native dependencies required by sharp. Add this line to your Dockerfile before installing Node.js dependencies:

RUN apk add --update --no-cache vips-dev

This ensures the necessary libraries for sharp are available, potentially resolving the installation issues. For more detailed information on system dependencies for sharp, refer to the sharp installation guide.

If you continue to face issues or have any more questions, feel free to ask.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

I have added some info to Dockerfile of the frontend program, and i exce success.

the info as:

RUN apk add --update --no-cache vips-dev fftw-dev build-base

image