Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] #2367

Closed
Jerryye17 opened this issue May 4, 2024 · 6 comments
Closed

[Bug] #2367

Jerryye17 opened this issue May 4, 2024 · 6 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@Jerryye17
Copy link

💻 系统环境

Other Linux

📦 部署环境

Docker

🌐 浏览器

Chrome

🐛 问题描述

构建最新版本(0.153.1)镜像失败
docker build -t lobe-chat:0.153.1

[+] Building 8.6s (10/22) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.08kB 0.0s
=> [internal] load metadata for docker.io/library/node:20-slim 3.2s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 142B 0.0s
=> [base 1/1] FROM docker.io/library/node:20-slim@sha256:72f2f046a5f8468db28730b990b37de63ce93fd1a72a40f531d6aa82afdf0d46 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 4.58MB 0.1s
=> CACHED [sharp 1/3] RUN corepack enable 0.0s
=> CACHED [sharp 2/3] WORKDIR /app 0.0s
=> CACHED [builder 3/7] COPY package.json ./ 0.0s
=> [builder 4/7] RUN npm config set registry https://registry.npmmirror.com/ 1.0s
=> ERROR [builder 5/7] RUN pnpm i 4.2s

[builder 5/7] RUN pnpm i:
4.091 Internal Error: Error when performing the request to https://registry.npmjs.org/pnpm; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
4.091 at fetch (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22882:11)
4.091 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
4.091 at async fetchAsJson (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22896:20)
4.091 at async fetchLatestStableVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22948:20)
4.091 at async fetchLatestStableVersion2 (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22971:14)
4.091 at async Engine.getDefaultVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23349:25)
4.091 at async executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:24207:28)
4.091 at async BinaryCommand.validateAndExecute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21173:22)
4.091 at async _Cli.run (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22148:18)
4.091 at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:24279:12)


Dockerfile:25

23 | # If you want to build docker in China
24 | RUN npm config set registry https://registry.npmmirror.com/
25 | >>> RUN pnpm i
26 |
27 | COPY . .

ERROR: failed to solve: process "/bin/sh -c pnpm i" did not complete successfully: exit code: 1

🚦 期望结果

能编译成功

📷 复现步骤

No response

📝 补充信息

No response

@Jerryye17 Jerryye17 added the 🐛 Bug Something isn't working | 缺陷 label May 4, 2024
@lobehubbot
Copy link
Member

👀 @Jerryye17

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@arvinxx
Copy link
Contributor

arvinxx commented May 4, 2024

感觉是你的网络问题吧

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think it's your network problem.

@arvinxx arvinxx closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
@lobehubbot
Copy link
Member

@Jerryye17

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@Jerryye17
Copy link
Author

Dockerfile里
RUN npm config set registry https://registry.npmmirror.com/
改成 RUN npm config set registry https://repo.huaweicloud.com/repository/npm
build就成功了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Dockerfile
RUN npm config set registry https://registry.npmmirror.com/
Change to RUN npm config set registry https://repo.huaweicloud.com/repository/npm
The build is successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Done
Development

No branches or pull requests

3 participants