quivr
quivr copied to clipboard
[Bug]: An unexpected error occurred: "https://registry.yarnpkg.com/node-gyp: connect ENETUNREACH
What happened?
after build : docker compose up --build # if OPENAI
i got these:
projects/Quivr# docker compose up --build [+] Building 6.7s (16/33) => [quivr-frontend-prebuilt internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [stangirard/quivr-backend-prebuilt:latest internal] load build definition from Dockerfile 0.5s => => transferring dockerfile: 32B 0.0s => [quivr-frontend-prebuilt internal] load .dockerignore 0.6s => => transferring context: 35B 0.0s => [stangirard/quivr-backend-prebuilt:latest internal] load .dockerignore 0.8s => => transferring context: 35B 0.0s => [quivr-frontend-prebuilt internal] load metadata for docker.io/library/node:18-alpine 1.0s => [stangirard/quivr-backend-prebuilt:latest internal] load metadata for docker.io/library/python:3.11.6-slim-bullseye 0.9s => [quivr-frontend-prebuilt base 1/1] FROM docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98 0.0s => [quivr-frontend-prebuilt internal] load build context 1.3s => => transferring context: 81.67kB 0.1s => [stangirard/quivr-backend-prebuilt:latest internal] load build context 1.1s => => transferring context: 17.00kB 0.0s => CACHED [quivr-frontend-prebuilt builder 1/4] WORKDIR /app 0.0s => CACHED [quivr-frontend-prebuilt runner 2/8] RUN addgroup --system --gid 1001 nodejs 0.0s => CACHED [quivr-frontend-prebuilt runner 3/8] RUN adduser --system --uid 1001 nextjs 0.1s => CACHED [stangirard/quivr-backend-prebuilt:latest 1/8] FROM docker.io/library/python:3.11.6-slim-bullseye@sha256:0c1fbb294096d842ad79 0.0s => CACHED [quivr-frontend-prebuilt deps 1/5] RUN apk add --no-cache libc6-compat python3 make g++ 0.1s => ERROR [quivr-frontend-prebuilt deps 2/5] RUN yarn global add node-gyp 4.6s => CANCELED [stangirard/quivr-backend-prebuilt:latest 2/8] RUN apt-get clean && apt-get update && apt-get install -y libgeos-dev 4.1s
[quivr-frontend-prebuilt deps 2/5] RUN yarn global add node-gyp: #0 2.600 yarn global v1.22.19 #0 2.680 [1/4] Resolving packages... #0 3.835 error An unexpected error occurred: "https://registry.yarnpkg.com/node-gyp: connect ENETUNREACH 2606:4700::6810:1922:443". #0 3.836 info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log". #0 3.836 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
failed to solve: executor failed running [/bin/sh -c yarn global add node-gyp]: exit code: 1
Relevant log output
No response
Twitter / LinkedIn details
No response
🤖
Hello @9cat! :wave:
Nice to meet you! I'm Dosu, a friendly bot here to assist you with your issues, answer your questions, and help you become a contributor. While we wait for a human maintainer, I'm here to help you in any way I can. Let's get through this together! :smiley:
Based on the error message you provided, it seems like the Docker container is unable to connect to the internet when trying to globally add "node-gyp" using yarn. This "connect ENETUNREACH" error typically occurs when there's a network connectivity issue.
However, I noticed that in the Dockerfile for Quivr, there is no command to run "yarn global add node-gyp". Therefore, it's not clear why you're encountering this error during the build process of Quivr using Docker compose.
If you're running this command manually inside the Docker container, please ensure the container has proper internet access. If you're running this command in the Dockerfile, you should add it after the "RUN yarn install --network-timeout 1000000" command.
If the problem persists, you might want to check your Docker network settings or the network connection of the host machine.
For more context, here is the Dockerfile being used when encountering the error:
FROM node:18.13.0-alpine
# Install Python and essential build tools
RUN apk add --update --no-cache python3 make g++ && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
# Create the directory on the node image
# where our Next.js app will live
RUN mkdir -p /app
# Set /app as the working directory
WORKDIR /app
# Copy package.json and yarn.lock
# to the /app working directory
COPY package*.json yarn.lock ./
# Install dependencies in /app
RUN yarn install --network-timeout 1000000
# Copy the rest of our Next.js folder into /app
COPY . .
# Ensure port 3000 is accessible to our system
EXPOSE 3000
# Run yarn dev, as we would via the command line
CMD ["yarn", "dev"]
This Dockerfile is located in the frontend
directory and is named Dockerfile.dev
. It is based on the node:18.13.0-alpine
image and includes steps to install Python and essential build tools, create a directory for the Next.js app, copy necessary files, install dependencies, expose port 3000, and run the yarn dev
command. You can find it here.
If you could provide more context or the exact steps you're taking when encountering this error, I might be able to provide a more precise solution.
Sources
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.
If you want to continue the conversation, start your reply with @dosu-bot.
Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.