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

docker build报错 #1986

Closed
Yoki659 opened this issue Jul 8, 2024 · 3 comments
Closed

docker build报错 #1986

Yoki659 opened this issue Jul 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Yoki659
Copy link

Yoki659 commented Jul 8, 2024

使用docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.5 . --build-arg name=app --build-arg proxy=taobao
打包时报了这个错误
1720409415127

@Yoki659 Yoki659 added the bug Something isn't working label Jul 8, 2024
@c121914yu
Copy link
Collaborator

终端输出底部的错误信息表明在从RPC(远程过程调用)服务器接收状态时出现了问题。具体错误是:

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF

这个错误表明在过程中与服务器的连接丢失或服务器变得不可用。以下是一些可以采取的步骤来排查和解决这个问题:

  1. 检查服务器状态:确保你尝试连接的服务器正在运行。如果服务器崩溃或变得无响应,可能需要重启服务器。

  2. 网络问题:确认没有网络问题导致连接中断。检查你的互联网连接和任何可能影响连接的网络配置。

  3. 重试操作:有时,瞬时问题可能会导致这样的错误。简单地重试操作可能会解决问题。

  4. 增加超时时间:如果操作超时,可能需要增加RPC调用的超时时间设置。

  5. 检查服务器日志:查看服务器日志,看看是否有任何错误或警告可以提供更多关于服务器为何变得不可用的线索。

  6. 更新依赖项:确保所有依赖项都是最新的。有时,过时的依赖项可能会导致兼容性问题。

  7. 检查代码:检查代码是否有任何潜在问题可能导致服务器变得无响应或崩溃。

如果问题仍然存在,你可能需要提供更多关于服务器和你尝试执行的具体操作的详细信息,以便进一步协助。

@ws02589111
Copy link

看起来像是React版本的问题?使用当前的最新版本的代码(dd2a9bd)执行的docker build

Failed to compile.

../../packages/web/components/common/DndDrag/index.tsx:44:6
Type error: 'DragDropContext' cannot be used as a JSX component.
  Its instance type 'DragDropContext' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'React.ReactNode' is not assignable to type 'import("/app/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/ts5.0/index").ReactNode'.

  42 |
  43 |   return (
> 44 |     <DragDropContext onDragStart={onDragStart} onDragEnd={onDragEnd}>
     |      ^
  45 |       <Droppable droppableId="droppable" renderClone={renderClone}>
  46 |         {(provided, snapshot) => {
  47 |           return (
/app/projects/app:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  app@4.8.6 build: `next build`
Exit status 1
The command '/bin/sh -c pnpm --filter=app build' returned a non-zero code: 1

@c121914yu
Copy link
Collaborator

看起来像是React版本的问题?使用当前的最新版本的代码(dd2a9bd)执行的docker build

Failed to compile.

../../packages/web/components/common/DndDrag/index.tsx:44:6
Type error: 'DragDropContext' cannot be used as a JSX component.
  Its instance type 'DragDropContext' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'React.ReactNode' is not assignable to type 'import("/app/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/ts5.0/index").ReactNode'.

  42 |
  43 |   return (
> 44 |     <DragDropContext onDragStart={onDragStart} onDragEnd={onDragEnd}>
     |      ^
  45 |       <Droppable droppableId="droppable" renderClone={renderClone}>
  46 |         {(provided, snapshot) => {
  47 |           return (
/app/projects/app:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  app@4.8.6 build: `next build`
Exit status 1
The command '/bin/sh -c pnpm --filter=app build' returned a non-zero code: 1

某些环境下的镜像确实有问题,升级了一波,在我的 mac 和 wsl2 以及 git action 都正常了。 https://github.com/labring/FastGPT/releases/edit/v4.8.7-alpha

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
None yet
Development

No branches or pull requests

3 participants