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] 关于docker build的问题 #3008

Closed
jaychoubaby opened this issue Jun 24, 2024 · 9 comments
Closed

[Bug] 关于docker build的问题 #3008

jaychoubaby opened this issue Jun 24, 2024 · 9 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@jaychoubaby
Copy link

📦 部署环境

Docker

📌 软件版本

1.0.6

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

我在使用docker bulid -t编译的时候,一直报错,首先是lint的检查报错,接着又是@clerk/types的报错,我用的是1.0.6版本的代码进行本地编译,可以正常运行,可是当我打镜像的时候就出现了这个问题,我想请问你们开发在docker bulid的时候是否遇到过这个问题,有没有好的解决办法,感谢回复。

📷 复现步骤

docker bulid -t

🚦 期望结果

正确编译

📝 补充信息

No response

@jaychoubaby jaychoubaby added the 🐛 Bug Something isn't working | 缺陷 label Jun 24, 2024
@lobehubbot
Copy link
Member

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


📦 Deployment environment

Docker

📌 Software version

1.0.6

💻 System environment

Windows

🌐 Browser

Chrome

🐛 Problem description

When I was using docker bulid -t to compile, I kept getting errors. First, the lint check reported an error, and then @clerk/types reported an error. I used the 1.0.6 version of the code for local compilation, and it ran normally, but This problem occurred when I created the image. I would like to ask if you have encountered this problem when developing docker bulid. Do you have a good solution? Thank you for your reply.

📷 Steps to reproduce

docker build -t

🚦 Expected results

compile correctly

📝 Supplementary information

No response

@lobehubbot
Copy link
Member

👀 @jaychoubaby

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@Sun-drenched
Copy link

详细的报错信息?

@lobehubbot
Copy link
Member

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


Detailed error message?

@jaychoubaby
Copy link
Author

这是当我设置跳过lint检查之后的报错信息:

` => ERROR [builder 6/6] RUN npm run build:docker 296.5s

[builder 6/6] RUN npm run build:docker:
4.008
4.008 > @lobehub/[email protected] build:docker
4.008 > DOCKER=true next build && npm run build-sitemap
4.008
8.291 Attention: Next.js now collects completely anonymous telemetry regarding usage.
8.291 This information is used to shape Next.js' roadmap and prioritize features.
8.291 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
8.291 https://nextjs.org/telemetry
8.291
8.539 ▲ Next.js 14.2.4
8.539
8.725 Creating an optimized production build ...
9.398 ✓ (pwa) Compiling for server...
9.410 ✓ (pwa) Compiling for server...
9.421 ✓ (pwa) Compiling for client (static)...
9.425 ○ (pwa) Service worker: /app/public/sw.js
9.425 ○ (pwa) URL: /sw.js
9.425 ○ (pwa) Scope: /
256.1 ✓ Compiled successfully
256.1 Skipping linting
256.1 Checking validity of types ...
295.3 Failed to compile.
295.3
295.3 ./src/app/(main)/profile/[[...slugs]]/Client.tsx:4:32
295.3 Type error: Cannot find module '@clerk/types' or its corresponding type declarations.
295.3
295.3 2 |
295.3 3 | import { UserProfile } from '@clerk/nextjs';
295.3 > 4 | import { ElementsConfig } from '@clerk/types';
295.3 | ^
295.3 5 | import { createStyles } from 'antd-style';
295.3 6 | import { memo } from 'react';
295.3 7 |
295.7 npm notice
295.7 npm notice New minor version of npm available! 10.7.0 -> 10.8.1
295.7 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
295.7 npm notice To update run: npm install -g [email protected]
295.7 npm notice


Dockerfile:51

49 |
50 | # run build standalone for docker version
51 | >>> RUN npm run build:docker
52 |
53 | ## Production image, copy all the files and run next

ERROR: failed to solve: process "/bin/sh -c npm run build:docker" did not complete successfully: exit code: 1`

@jaychoubaby
Copy link
Author

我直接fork代码之后通过 github action进行docker build,报错如下:

` - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 79)

  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 83)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 85)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 88)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 89)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 90)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 93)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 94)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 95)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 98)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 101)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 104)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 107)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 108)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 111)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 114)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 117)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 120)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 121)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 124)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 127)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 130)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 133)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 136)
    Dockerfile:51

49 |
50 | # run build standalone for docker version
51 | >>> RUN npm run build:docker
52 |
53 | ## Production image, copy all the files and run next

ERROR: failed to solve: process "/bin/sh -c npm run build:docker" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c npm run build:docker" did not complete successfully: exit code: 1`

@jaychoubaby
Copy link
Author

是我的问题,我重新编译可以过了

@lobehubbot
Copy link
Member

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


It's my problem, I can fix it by recompiling

@lobehubbot
Copy link
Member

@jaychoubaby

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

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