quivr icon indicating copy to clipboard operation
quivr copied to clipboard

[Bug]: 安装不了

Open VarWolf opened this issue 1 year ago • 1 comments

What happened?

Packages: +1178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 1209, reused 1178, downloaded 0, added 0, done node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, failed in 5.4s .../[email protected]/node_modules/sharp install$ (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp reb… │ sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br │ sharp: Installation error: Request timed out │ sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies └─ Failed in 5.4s at E:\AIPY\1.0_assistant_report\Quivr\frontend\node_modules.pnpm\[email protected]\node_modules\sharp node_modules/.pnpm/@[email protected][email protected]/node_modules/@sentry/cli: Running install script...  ELIFECYCLE  Command failed with exit code 1.

Relevant log output

Packages: +1178
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1209, reused 1178, downloaded 0, added 0, done
node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, failed in 5.4s
.../[email protected]/node_modules/sharp install$ (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp reb…
│ sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br
│ sharp: Installation error: Request timed out
│ sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
└─ Failed in 5.4s at E:\AIPY\1.0_assistant_report\Quivr\frontend\node_modules\.pnpm\[email protected]\node_modules\sharp
node_modules/.pnpm/@[email protected][email protected]/node_modules/@sentry/cli: Running install script...
 ELIFECYCLE  Command failed with exit code 1.

Twitter / LinkedIn details

No response

VarWolf avatar Dec 27 '23 08:12 VarWolf

🤖

你好,@VarWolf!我是Dosu,一个友好的机器人,我可以帮助你解决错误,回答问题,甚至成为一个贡献者。虽然我是一个机器人,但在等待人类维护者的时候,我在这里为你提供帮助。让我们一起解决你遇到的问题吧!

您遇到的问题可能是由于 sharp 包,这是一个原生的 Node.js 模块,需要在您的环境中安装额外的构建工具。在您的 Dockerfile 中,您已经安装了 Python,make,g++,和 git,这些都是构建原生插件所需的。然而,sharp 包可能需要额外的库。

为了解决这个问题,您可以在 Dockerfile 中的 yarn install 命令之前添加以下行:

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

这将为 sharp 包安装必要的库。您更新后的 Dockerfile 应该如下所示:

FROM node:18.13.0-alpine
# Install Python and essential build tools
RUN apk add --update --no-cache python3 make g++ git && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools

# Install additional libraries for sharp package
RUN apk add --update --no-cache vips-dev fftw-dev build-base

# 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 . .

# Build the Next.js application
RUN yarn build

# Ensure port 3000 is accessible to our system
EXPOSE 1337

# Run yarn start, as we would via the command line 
CMD ["yarn", "start"]

这应该可以解决在 Quivr 仓库中 sharp 包的安装错误。

关于 sharp 包在 Quivr 仓库中的确切版本,我在仓库中没有找到答案,但答案可能在其他地方可用,或者我可能错过了它。

如果您在尝试这些步骤后仍然遇到问题,或者需要更多的帮助,Dosu 随时为您提供帮助。

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.

dosubot[bot] avatar Dec 27 '23 08:12 dosubot[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.

github-actions[bot] avatar Jan 26 '24 12:01 github-actions[bot]